Skip to content

Commit 8874263

Browse files
fix: return discovered port when packager is already running on a different port
When the default port is unavailable and `getNextPort` finds a packager already running on a different port for the same project, `handlePortUnavailable` correctly logs the discovered port but returns the original (unavailable) port. This causes the build to pass the wrong port to gradle/xcodebuild.
1 parent 2361e61 commit 8874263

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/cli-tools/src/handlePortUnavailable.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const handlePortUnavailable = async (
1818

1919
if (!start) {
2020
packager = false;
21+
port = nextPort;
2122
logAlreadyRunningBundler(nextPort);
2223
} else {
2324
const {change} = await askForPortChange(port, nextPort);

0 commit comments

Comments
 (0)