Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

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

Ishan2fce84a1d45b
diff --git a/apps/server/src/open.ts b/apps/server/src/open.ts
index dd7d8c384..870da4e55 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<void, OpenError>((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 })),