From df4ccb9349fddc35c40313073d62f16697136620 Mon Sep 17 00:00:00 2001 From: Toma Nikolov Date: Mon, 21 Aug 2017 17:07:48 +0300 Subject: [PATCH] Fix native platform add after cloud build. When we prepare the platform for cloud build we skip the native prepare. After this partial prepare, the platform directory contains only .js files. In order to make a local build we should add the native part of the platform which fails with `ENOTEMPTY: directory not empty, rename`. --- lib/services/platform-service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 1d072f6592..3f02b9c341 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -144,6 +144,8 @@ export class PlatformService extends EventEmitter implements IPlatformService { config.pathToTemplate = customTemplateOptions && customTemplateOptions.pathToTemplate; if (!nativePrepare || !nativePrepare.skipNativePrepare) { + const platformDir = path.join(projectData.platformsDir, platformData.normalizedPlatformName.toLowerCase()); + this.$fs.deleteDirectory(platformDir); await this.addPlatformCoreNative(platformData, frameworkDir, installedVersion, projectData, config); }