From 2fce84a1d45bdecab05ef1f6864266236b53a5df Mon Sep 17 00:00:00 2001 From: Ishan Date: Sun, 12 Apr 2026 13:11:11 +0530 Subject: [PATCH] fix: quote editor launch args on Windows to support paths with spaces (#1805) --- apps/server/src/open.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/server/src/open.ts b/apps/server/src/open.ts index dd7d8c3849bd4b15af84803e44ed34f70376451e..870da4e55e641466bf820dc3503368521d053cf7 100644 --- a/apps/server/src/open.ts +++ b/apps/server/src/open.ts @@ -293,11 +293,16 @@ export const launchDetached = (launch: EditorLaunch) => yield* Effect.callback((resume) => { let child; try { - child = spawn(launch.command, [...launch.args], { - detached: true, - stdio: "ignore", - shell: process.platform === "win32", - }); + const isWin32 = process.platform === "win32"; + child = spawn( + launch.command, + isWin32 ? launch.args.map((a) => `"${a}"`) : [...launch.args], + { + detached: true, + stdio: "ignore", + shell: isWin32, + }, + ); } catch (error) { return resume( Effect.fail(new OpenError({ message: "failed to spawn detached process", cause: error })), -- 2.54.0