@@ -268,7 +268,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
268
268
let project = this . createPbxProj ( ) ;
269
269
let frameworkName = path . basename ( frameworkPath , path . extname ( frameworkPath ) ) ;
270
270
let frameworkBinaryPath = path . join ( frameworkPath , frameworkName ) ;
271
- let isDynamic = _ . contains ( this . $childProcess . exec ( ` otool -Vh ${ frameworkBinaryPath } ` ) . wait ( ) , " DYLIB " ) ;
271
+ let isDynamic = _ . contains ( this . $childProcess . spawnFromEvent ( " otool" , [ " -Vh" , frameworkBinaryPath ] , "close" ) . wait ( ) . stdout , " DYLIB " ) ;
272
272
273
273
let frameworkAddOptions : xcode . Options = { customFramework : true } ;
274
274
@@ -577,7 +577,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
577
577
this . $errors . failWithoutHelp ( "The bundle at %s does not contain an Info.plist file." , libraryPath ) ;
578
578
}
579
579
580
- let packageType = this . $childProcess . exec ( ` /usr/libexec/PlistBuddy -c "Print :CFBundlePackageType" " ${ infoPlistPath } "` ) . wait ( ) . trim ( ) ;
580
+ let packageType = this . $childProcess . spawnFromEvent ( " /usr/libexec/PlistBuddy" , [ "-c" , "Print :CFBundlePackageType" , infoPlistPath ] , "close" ) . wait ( ) . stdout . trim ( ) ;
581
581
if ( packageType !== "FMWK" ) {
582
582
this . $errors . failWithoutHelp ( "The bundle at %s does not appear to be a dynamic framework." , libraryPath ) ;
583
583
}
@@ -761,8 +761,10 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
761
761
if ( ! this . $fs . exists ( projectFile ) . wait ( ) ) {
762
762
this . $fs . writeFile ( projectFile , "" ) . wait ( ) ;
763
763
}
764
-
765
- let mergeScript = `require 'xcodeproj'; Xcodeproj::Config.new('${ projectFile } ').merge(Xcodeproj::Config.new('${ pluginFile } ')).save_as(Pathname.new('${ projectFile } '))` ;
764
+
765
+ let escapedProjectFile = projectFile . replace ( / ' / g, "\\'" ) ,
766
+ escapedPluginFile = pluginFile . replace ( / ' / g, "\\'" ) ,
767
+ mergeScript = `require 'xcodeproj'; Xcodeproj::Config.new('${ escapedProjectFile } ').merge(Xcodeproj::Config.new('${ escapedPluginFile } ')).save_as(Pathname.new('${ escapedProjectFile } '))` ;
766
768
this . $childProcess . exec ( `ruby -e "${ mergeScript } "` ) . wait ( ) ;
767
769
} ) . future < void > ( ) ( ) ;
768
770
}
0 commit comments