From 9eb8a92169e0b405a070d2f35dbea05d4dfde548 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Sat, 5 Sep 2026 14:46:06 +0300 Subject: [PATCH] fix(cli): probe bun.exe under BUN_INSTALL on Windows isBunInstalled() spawned /bin/bun, which does not exist on Windows where the installer ships bun.exe. spawnSync adds no extension to an explicit path, so the probe failed and the CLI quietly started the server under Node even with Bun installed. The probe now names bun.exe on win32. Claude-Session: https://claude.ai/code/session_01VqV56Hez25hTxXH4ipJfzH --- packages/web/bin/cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/web/bin/cli.js b/packages/web/bin/cli.js index 098e9005..dd56e0ad 100755 --- a/packages/web/bin/cli.js +++ b/packages/web/bin/cli.js @@ -117,7 +117,10 @@ function getBunBinary() { return process.env.BUN_BINARY.trim(); } if (typeof process.env.BUN_INSTALL === 'string' && process.env.BUN_INSTALL.trim().length > 0) { - return path.join(process.env.BUN_INSTALL.trim(), 'bin', 'bun'); + // The Windows installer places bun.exe there; spawnSync does not append + // the extension to an explicit path, so without it the probe fails and + // the CLI silently falls back to Node. + return path.join(process.env.BUN_INSTALL.trim(), 'bin', process.platform === 'win32' ? 'bun.exe' : 'bun'); } return 'bun'; }