@@ -268,7 +268,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
268268 let project = this . createPbxProj ( ) ;
269269 let frameworkName = path . basename ( frameworkPath , path . extname ( frameworkPath ) ) ;
270270 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 " ) ;
272272
273273 let frameworkAddOptions : xcode . Options = { customFramework : true } ;
274274
@@ -577,7 +577,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
577577 this . $errors . failWithoutHelp ( "The bundle at %s does not contain an Info.plist file." , libraryPath ) ;
578578 }
579579
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 ( ) ;
581581 if ( packageType !== "FMWK" ) {
582582 this . $errors . failWithoutHelp ( "The bundle at %s does not appear to be a dynamic framework." , libraryPath ) ;
583583 }
@@ -762,7 +762,9 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
762762 this . $fs . writeFile ( projectFile , "" ) . wait ( ) ;
763763 }
764764
765- let mergeScript = `require 'xcodeproj'; Xcodeproj::Config.new('${ projectFile } ').merge(Xcodeproj::Config.new('${ pluginFile } ')).save_as(Pathname.new('${ projectFile } '))` ;
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 } '))` ;
766768 this . $childProcess . exec ( `ruby -e "${ mergeScript } "` ) . wait ( ) ;
767769 } ) . future < void > ( ) ( ) ;
768770 }
0 commit comments