From c9010c5c5823f517cf5272ebf7a82a3f2e823db0 Mon Sep 17 00:00:00 2001 From: Tafari Higgs Date: Thu, 5 Feb 2026 13:06:09 -0500 Subject: [PATCH] Fix Windows path handling for usernames with spaces On Windows, when the username contains spaces (e.g., "Tafari Higgs"), bun-runner.js fails with: Syntax Error at C:\Users\Tafari:1:2 This happens because `shell: IS_WINDOWS` (true on Windows) causes spawn() to route through cmd.exe, which misinterprets the path at the first space in the username directory. Removing `shell: true` on Windows fixes the issue since spawn() can invoke the Bun binary directly without needing a shell wrapper. Added `windowsHide: true` to prevent a visible console window from appearing, matching the previous hidden behavior under cmd.exe. Co-Authored-By: Claude Opus 4.6 --- plugin/scripts/bun-runner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/scripts/bun-runner.js b/plugin/scripts/bun-runner.js index aaf8b21d..80e8f44f 100644 --- a/plugin/scripts/bun-runner.js +++ b/plugin/scripts/bun-runner.js @@ -72,9 +72,11 @@ if (!bunPath) { // Spawn Bun with the provided script and args // Use spawn (not spawnSync) to properly handle stdio +// Note: Don't use shell mode on Windows - it breaks paths with spaces in usernames +// Use windowsHide to prevent a visible console window from spawning on Windows const child = spawn(bunPath, args, { stdio: 'inherit', - shell: IS_WINDOWS, + windowsHide: true, env: process.env });