Skip to content

Commit 3087830

Browse files
Fix plistPath when using a prebuilt binary (appPath) (#2705)
* Fix plistPath when using a prebuilt binary (appPath) * fix syntax --------- Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
1 parent ddbba6c commit 3087830

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/cli-platform-apple/src/commands/runCommand/installApp.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export default async function installApp({
6363
const targetBuildDir = buildSettings.TARGET_BUILD_DIR;
6464
const infoPlistPath = buildSettings.INFOPLIST_PATH;
6565

66-
if (!infoPlistPath) {
66+
const plistPath = appPath
67+
? path.join(appPath, 'Info.plist')
68+
: path.join(targetBuildDir, infoPlistPath);
69+
if (!plistPath) {
6770
throw new CLIError('Failed to find Info.plist');
6871
}
6972

@@ -86,11 +89,7 @@ export default async function installApp({
8689
const bundleID = child_process
8790
.execFileSync(
8891
'/usr/libexec/PlistBuddy',
89-
[
90-
'-c',
91-
'Print:CFBundleIdentifier',
92-
path.join(targetBuildDir, infoPlistPath),
93-
],
92+
['-c', 'Print:CFBundleIdentifier', plistPath],
9493
{encoding: 'utf8'},
9594
)
9695
.trim();

0 commit comments

Comments
 (0)