Skip to content

fix(windows): use stdio array in Bun.spawnSync#455

Open
lendtrain wants to merge 1 commit intogarrytan:mainfrom
lendtrain:fix/windows-stdio-array
Open

fix(windows): use stdio array in Bun.spawnSync#455
lendtrain wants to merge 1 commit intogarrytan:mainfrom
lendtrain:fix/windows-stdio-array

Conversation

@lendtrain
Copy link

Summary

Fixes the browse daemon failing on Windows with stdio must be an array error.

One-line change: { stdio: 'ignore' }{ stdio: ['ignore', 'ignore', 'ignore'] }

Root Cause

Bun.spawnSync requires stdio to be an array, not a string. The Windows code path at browse/src/cli.ts:239 passed the string form. macOS/Linux take the else branch which already uses an array (['ignore', 'pipe', 'pipe']), so this was never caught.

Before

$ browse goto https://example.com
[browse] Starting server...
[browse] stdio must be an array

After

$ browse goto https://example.com
[browse] Starting server...
Navigated to https://example.com (200)

Test Plan

  • Verified fix on Windows 10 Pro with Bun 1.3.11
  • Recompiled browse.exe and confirmed end-to-end navigation works

Fixes #454

Bun's spawnSync requires stdio to be an array, not a string.
The Windows code path passed `stdio: 'ignore'` which causes
"stdio must be an array" error. macOS/Linux take the else branch
which already uses an array, so this was never caught.

Fixes garrytan#454

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Windows: browse daemon fails with 'stdio must be an array'

1 participant