We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9019cd commit 2fce84aCopy full SHA for 2fce84a
apps/server/src/open.ts
@@ -293,11 +293,16 @@ export const launchDetached = (launch: EditorLaunch) =>
293
yield* Effect.callback<void, OpenError>((resume) => {
294
let child;
295
try {
296
- child = spawn(launch.command, [...launch.args], {
297
- detached: true,
298
- stdio: "ignore",
299
- shell: process.platform === "win32",
300
- });
+ const isWin32 = process.platform === "win32";
+ child = spawn(
+ launch.command,
+ isWin32 ? launch.args.map((a) => `"${a}"`) : [...launch.args],
+ {
301
+ detached: true,
302
+ stdio: "ignore",
303
+ shell: isWin32,
304
+ },
305
+ );
306
} catch (error) {
307
return resume(
308
Effect.fail(new OpenError({ message: "failed to spawn detached process", cause: error })),
0 commit comments