@@ -224,6 +224,7 @@ export class PlatformService implements IPlatformService {
224224 } ) ;
225225 }
226226
227+ this . ensurePlatformInstalled ( platform ) . wait ( ) ;
227228 return this . preparePlatformCore ( platform ) . wait ( ) ;
228229 } ) . future < boolean > ( ) ( ) ;
229230 }
@@ -232,7 +233,6 @@ export class PlatformService implements IPlatformService {
232233 private preparePlatformCore ( platform : string ) : IFuture < boolean > {
233234 return ( ( ) => {
234235 platform = platform . toLowerCase ( ) ;
235- this . ensurePlatformInstalled ( platform ) . wait ( ) ;
236236
237237 let platformData = this . $platformsData . getPlatformData ( platform ) ;
238238 platformData . platformProjectService . ensureConfigurationFileInAppResources ( ) . wait ( ) ;
@@ -322,7 +322,7 @@ export class PlatformService implements IPlatformService {
322322 // Replace placeholders in configuration files
323323 platformData . platformProjectService . interpolateConfigurationFile ( ) . wait ( ) ;
324324
325- this . $logger . out ( "Project successfully prepared (" + platform + ")" ) ;
325+ this . $logger . out ( "Project successfully prepared (" + platform + ")" ) ;
326326 return true ;
327327 } ) . future < boolean > ( ) ( ) ;
328328 }
@@ -337,14 +337,14 @@ export class PlatformService implements IPlatformService {
337337 }
338338
339339 public prepareAndExecute ( platform : string , executeAction : ( ) => IFuture < void > ) : IFuture < void > {
340- return ( ( ) => {
341- platform = platform . toLowerCase ( ) ;
342- if ( ! this . preparePlatform ( platform ) . wait ( ) ) {
343- this . $errors . failWithoutHelp ( "Verify that listed files are well-formed and try again the operation." ) ;
344- }
345- executeAction ( ) . wait ( ) ;
346- } ) . future < void > ( ) ( ) ;
347- }
340+ return ( ( ) => {
341+ platform = platform . toLowerCase ( ) ;
342+ if ( ! this . preparePlatform ( platform ) . wait ( ) ) {
343+ this . $errors . failWithoutHelp ( "Verify that listed files are well-formed and try again the operation." ) ;
344+ }
345+ executeAction ( ) . wait ( ) ;
346+ } ) . future < void > ( ) ( ) ;
347+ }
348348
349349 public buildForDeploy ( platform : string , buildConfig ?: IBuildConfig ) : IFuture < void > {
350350 return ( ( ) => {
0 commit comments