From eec274b55dbc2192b4b15b27a85f9f92ab3d47af Mon Sep 17 00:00:00 2001 From: TsvetanMilanov Date: Tue, 14 Feb 2017 18:08:26 +0200 Subject: [PATCH] Install tns-android before we invoke the before prepare hook --- lib/services/platform-service.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 7300fc9efb..b1312e56a8 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -224,6 +224,7 @@ export class PlatformService implements IPlatformService { }); } + this.ensurePlatformInstalled(platform).wait(); return this.preparePlatformCore(platform).wait(); }).future()(); } @@ -232,7 +233,6 @@ export class PlatformService implements IPlatformService { private preparePlatformCore(platform: string): IFuture { return (() => { platform = platform.toLowerCase(); - this.ensurePlatformInstalled(platform).wait(); let platformData = this.$platformsData.getPlatformData(platform); platformData.platformProjectService.ensureConfigurationFileInAppResources().wait(); @@ -322,7 +322,7 @@ export class PlatformService implements IPlatformService { // Replace placeholders in configuration files platformData.platformProjectService.interpolateConfigurationFile().wait(); - this.$logger.out("Project successfully prepared ("+platform+")"); + this.$logger.out("Project successfully prepared (" + platform + ")"); return true; }).future()(); } @@ -337,14 +337,14 @@ export class PlatformService implements IPlatformService { } public prepareAndExecute(platform: string, executeAction: () => IFuture): IFuture { - return (() => { - platform = platform.toLowerCase(); - if (!this.preparePlatform(platform).wait()) { - this.$errors.failWithoutHelp("Verify that listed files are well-formed and try again the operation."); - } - executeAction().wait(); - }).future()(); - } + return (() => { + platform = platform.toLowerCase(); + if (!this.preparePlatform(platform).wait()) { + this.$errors.failWithoutHelp("Verify that listed files are well-formed and try again the operation."); + } + executeAction().wait(); + }).future()(); + } public buildForDeploy(platform: string, buildConfig?: IBuildConfig): IFuture { return (() => {