Skip to content

Commit

Permalink
Delete destination app dir when preparing project
Browse files Browse the repository at this point in the history
Delete dir where app will be copied on prepare. If we do not delete it, on Linux and Mac we receive EEXIST errors for symlinks inside app directory. Symlinks are common scenario when node_modules are used.

Fixes #394
  • Loading branch information
rosen-vladimirov committed Mar 30, 2015
1 parent 2fd3e14 commit ca8ae3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/services/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ export class PlatformService implements IPlatformService {

// Copy app folder to native project
var appSourceDirectoryPath = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME);

// Delete the destination app in order to prevent EEXIST errors when symlinks are used.
this.$fs.deleteDirectory(path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME)).wait();
shell.cp("-R", appSourceDirectoryPath, platformData.appDestinationDirectoryPath);

// Copy App_Resources to project root folder
Expand Down

0 comments on commit ca8ae3a

Please sign in to comment.