@@ -418,14 +418,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
418
418
public afterPrepareAllPlugins ( ) : IFuture < void > {
419
419
return ( ( ) => {
420
420
if ( this . $fs . exists ( this . projectPodFilePath ) . wait ( ) ) {
421
- // Check availability
422
- try {
423
- this . $childProcess . exec ( "gem which cocoapods" ) . wait ( ) ;
424
- this . $childProcess . exec ( "gem which xcodeproj" ) . wait ( ) ;
425
- } catch ( e ) {
426
- this . $errors . failWithoutHelp ( "CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again." ) ;
427
- }
428
-
429
421
let projectPodfileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
430
422
this . $logger . trace ( "Project Podfile content" ) ;
431
423
this . $logger . trace ( projectPodfileContent ) ;
@@ -507,9 +499,19 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
507
499
}
508
500
509
501
private executePodInstall ( ) : IFuture < any > {
510
- this . $logger . info ( "Installing pods..." ) ;
511
- let podTool = this . $config . USE_POD_SANDBOX ? "sandbox-pod" : "pod" ;
512
- return this . $childProcess . spawnFromEvent ( podTool , [ "install" ] , "close" , { cwd : this . platformData . projectRoot , stdio : 'inherit' } ) ;
502
+ return ( ( ) => {
503
+ // Check availability
504
+ try {
505
+ this . $childProcess . exec ( "gem which cocoapods" ) . wait ( ) ;
506
+ this . $childProcess . exec ( "gem which xcodeproj" ) . wait ( ) ;
507
+ } catch ( e ) {
508
+ this . $errors . failWithoutHelp ( "CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again." ) ;
509
+ }
510
+
511
+ this . $logger . info ( "Installing pods..." ) ;
512
+ let podTool = this . $config . USE_POD_SANDBOX ? "sandbox-pod" : "pod" ;
513
+ return this . $childProcess . spawnFromEvent ( podTool , [ "install" ] , "close" , { cwd : this . platformData . projectRoot , stdio : 'inherit' } ) . wait ( ) ;
514
+ } ) . future < any > ( ) ( ) ;
513
515
}
514
516
515
517
private prepareFrameworks ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > {
0 commit comments