Skip to content

fix: wait for browser-opener process to exit before returning-W-24154138 - #1775

Open
soridalac wants to merge 2 commits into
mainfrom
sl/org-open
Open

fix: wait for browser-opener process to exit before returning-W-24154138#1775
soridalac wants to merge 2 commits into
mainfrom
sl/org-open

Conversation

@soridalac

@soridalac soridalac commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Summary

  • Fixes race condition where sf org open exits before the browser-opener child process finishes launching the browser, causing intermittent
    failures — particularly on Windows and in VS Code's integrated terminal
  • Awaits the child process exit instead of fire-and-forget, with a guard for the case where the process has already exited before the handler is
    registered

Test plan

  • sf org open opens browser reliably on Windows (standalone terminal and VS Code integrated terminal)
  • sf org open continues to work on macOS and Linux with no added delay
  • sf org open --url-only is unaffected (skips browser launch)
  • sf org open --browser firefox works
  • sf org open --private works
  • Unit tests pass

What issues does this PR fix or reference?

@W-24154138@
cli related issue: forcedotcom/cli#3646

@svc-cli-bot
svc-cli-bot requested a review from a team as a code owner September 10, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants