Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pick correct TARGET_BUILD_DIR for run-ios #1032

Merged
merged 2 commits into from
Mar 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/platform-ios/src/commands/runIOS/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,11 @@ function bootSimulator(selectedSimulator: Device) {
}

function getTargetBuildDir(buildSettings: string) {
const targetBuildMatch = /TARGET_BUILD_DIR = (.+)$/m.exec(buildSettings);
return targetBuildMatch && targetBuildMatch[1]
? targetBuildMatch[1].trim()
: null;
const settings = JSON.parse(buildSettings);

return settings.length > 0
? settings[1].buildSettings.TARGET_BUILD_DIR
: settings[0].buildSettings.TARGET_BUILD_DIR;
FDiskas marked this conversation as resolved.
Show resolved Hide resolved
}

function getBuildPath(
Expand Down Expand Up @@ -403,6 +404,7 @@ function getBuildPath(
'-configuration',
configuration,
'-showBuildSettings',
'-json',
],
{encoding: 'utf8'},
);
Expand Down