Skip to content

Commit 2c5c964

Browse files
committed
Add check for "macos" when traversing FS for an xcode workspace
1 parent 0b01fd5 commit 2c5c964

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/host/src/node/cli/xcode-helpers.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,17 @@ export async function findXcodeWorkspace(fromPath: string) {
5353
return path.join(fromPath, workspace);
5454
}
5555

56-
// Check if the directory contain an ios directory and call recursively from that
56+
// Check if the directory contains an "ios" or a "macos" directory and call recursively from that
5757
const iosDirectory = path.join(fromPath, "ios");
5858
if (fs.existsSync(iosDirectory)) {
5959
return findXcodeWorkspace(iosDirectory);
6060
}
6161

62+
const macosDirectory = path.join(fromPath, "macos");
63+
if (fs.existsSync(macosDirectory)) {
64+
return findXcodeWorkspace(macosDirectory);
65+
}
66+
6267
// TODO: Consider continuing searching in parent directories
6368
throw new Error(`No Xcode workspace found in '${fromPath}'`);
6469
}

0 commit comments

Comments
 (0)