mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
fix: check exitCode in openBrowser() and reinit readline after @clack/prompts (#1782)
openBrowser() never checked the exitCode from Bun.spawnSync, so it silently returned success even when the browser command failed (headless VMs, no DISPLAY). Now checks exitCode and always shows the URL as fallback. selectFromList() uses @clack/prompts which creates/destroys its own readline on stdin. After it finishes, the shared readline in ui.ts can be corrupted (Bun #1707). Now explicitly closes and nulls the shared readline after @clack/prompts returns so the next prompt() call gets a fresh one. Fixes #1770 Agent: ux-engineer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
abe1f33318
commit
3988ffe90e
2 changed files with 24 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.3",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue