authorgravatar for ishansachu1@gmail.comIshan <ishansachu1@gmail.com> 2026-04-12 13:11:11+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-04-12 00:41:11-07:00
log2fce84a1d45bdecab05ef1f6864266236b53a5df
tree495af7753311b2a6d61c11baff06848e1d7a4e1b
parentf9019cd63f3bc409344418a662d73a8ef065f439
signature Signed by PGP key B5690EEEBB952194

fix: quote editor launch args on Windows to support paths with spaces (#1805)


1 files changed, 10 insertions(+), 5 deletions(-)

apps/server/src/open.ts+10-5
......@@ -293,11 +293,16 @@ export const launchDetached = (launch: EditorLaunch) =>
293293 yield* Effect.callback<void, OpenError>((resume) => {
294294 let child;
295295 try {
296 child = spawn(launch.command, [...launch.args], {
297 detached: true,
298 stdio: "ignore",
299 shell: process.platform === "win32",
300 });
296 const isWin32 = process.platform === "win32";
297 child = spawn(
298 launch.command,
299 isWin32 ? launch.args.map((a) => `"${a}"`) : [...launch.args],
300 {
301 detached: true,
302 stdio: "ignore",
303 shell: isWin32,
304 },
305 );
301306 } catch (error) {
302307 return resume(
303308 Effect.fail(new OpenError({ message: "failed to spawn detached process", cause: error })),