diff --git a/scripts/releases/ios-prebuild/build.js b/scripts/releases/ios-prebuild/build.js index bb3e33ff5934..a1aa2b7629dc 100644 --- a/scripts/releases/ios-prebuild/build.js +++ b/scripts/releases/ios-prebuild/build.js @@ -8,7 +8,7 @@ * @format */ -const {execSync} = require('child_process'); +const {execFileSync} = require('child_process'); /*:: import type { Dependency, Destination, Platform } from './types'; @@ -53,15 +53,19 @@ async function buildPlatform( buildFolder /*: string */, ) { console.log(`Building ${destination}...`); - const command = - `xcodebuild -scheme "${scheme}" -destination "generic/platform=${destination}" ` + - `-derivedDataPath "${buildFolder}" ` + - `-configuration "${configuration}" ` + - 'SKIP_INSTALL=NO \ - BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - DEBUG_INFORMATION_FORMAT=dwarf-with-dsym'; - - execSync(command, {cwd: rootFolder, stdio: 'inherit'}); + execFileSync( + 'xcodebuild', + [ + '-scheme', scheme, + '-destination', `generic/platform=${destination}`, + '-derivedDataPath', buildFolder, + '-configuration', configuration, + 'SKIP_INSTALL=NO', + 'BUILD_LIBRARY_FOR_DISTRIBUTION=YES', + 'DEBUG_INFORMATION_FORMAT=dwarf-with-dsym', + ], + {cwd: rootFolder, stdio: 'inherit'}, + ); } module.exports = {