Skip to content

Commit ca8ae3a

Browse files
Delete destination app dir when preparing project
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
1 parent 2fd3e14 commit ca8ae3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/services/platform-service.ts

+3
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ export class PlatformService implements IPlatformService {
142142

143143
// Copy app folder to native project
144144
var appSourceDirectoryPath = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME);
145+
146+
// Delete the destination app in order to prevent EEXIST errors when symlinks are used.
147+
this.$fs.deleteDirectory(path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME)).wait();
145148
shell.cp("-R", appSourceDirectoryPath, platformData.appDestinationDirectoryPath);
146149

147150
// Copy App_Resources to project root folder

0 commit comments

Comments
 (0)