Skip to content

Commit

Permalink
fix(ios): handle spaces in xcode path
Browse files Browse the repository at this point in the history
Fixes TIMOB-28207
  • Loading branch information
ewanharris authored and sgtcoolguy committed Oct 26, 2020
1 parent b242902 commit f8c8172
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions iphone/cli/hooks/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,16 @@ exports.init = function (logger, config, cli) {

fs.writeFileSync(exportsOptionsPlistFile, exportsOptions.toString('xml'));

// construct the command
const cmd = [
builder.xcodeEnv.executables.xcodebuild,
const args = [
'-exportArchive',
'-archivePath', '"' + stagingArchiveDir + '"',
'-exportPath', '"' + outputDir + '"',
'-exportOptionsPlist', '"' + exportsOptionsPlistFile + '"'
].join(' ');
'-archivePath', stagingArchiveDir,
'-exportPath', outputDir,
'-exportOptionsPlist', exportsOptionsPlistFile
];

// execute!
logger.debug(__('Running: %s', cmd.cyan));
exec(cmd, function (err, stdout, stderr) {
logger.debug(__('Running: %s %s', builder.xcodeEnv.executables.xcodebuild.cyan, args.join(' ').cyan));
appc.subprocess.run(builder.xcodeEnv.executables.xcodebuild, args, function (err, stdout, stderr) {
if (err) {
const output = stderr.trim();
output.split('\n').forEach(logger.trace);
Expand Down

0 comments on commit f8c8172

Please sign in to comment.