Skip to content

Commit 4a35dcc

Browse files
Merge pull request #395 from NativeScript/vladimirov/delete-app-dir-on-prepare
Delete destination app dir when preparing project
2 parents 2fd3e14 + ca8ae3a commit 4a35dcc

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)