diff --git a/apps/server/scripts/cli.ts b/apps/server/scripts/cli.ts index e5b5c0d00a..3eaa72ea8e 100644 --- a/apps/server/scripts/cli.ts +++ b/apps/server/scripts/cli.ts @@ -132,6 +132,7 @@ const buildCmd = Command.make( cwd: serverDir, stdout: config.verbose ? "inherit" : "ignore", stderr: "inherit", + // Windows needs shell mode to resolve .cmd shims (e.g. bun.cmd). shell: process.platform === "win32", })`bun tsdown`, ); @@ -226,6 +227,7 @@ const publishCmd = Command.make( cwd: serverDir, stdout: config.verbose ? "inherit" : "ignore", stderr: "inherit", + // Windows needs shell mode to resolve .cmd shims. shell: process.platform === "win32", }), ); diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index 8823b88513..c44109faea 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -580,6 +580,8 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( ChildProcess.make({ cwd: repoRoot, ...commandOutputOptions(options.verbose), + // Windows needs shell mode to resolve .cmd shims (e.g. bun.cmd). + shell: process.platform === "win32", })`bun run build:desktop`, ); } @@ -642,6 +644,8 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( ChildProcess.make({ cwd: stageAppDir, ...commandOutputOptions(options.verbose), + // Windows needs shell mode to resolve .cmd shims (e.g. bun.cmd). + shell: process.platform === "win32", })`bun install --production`, ); @@ -680,6 +684,8 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( cwd: stageAppDir, env: buildEnv, ...commandOutputOptions(options.verbose), + // Windows needs shell mode to resolve .cmd shims. + shell: process.platform === "win32", })`bunx electron-builder ${platformConfig.cliFlag} --${options.arch} --publish never`, ); diff --git a/scripts/dev-runner.ts b/scripts/dev-runner.ts index c72411e318..89d7a104cf 100644 --- a/scripts/dev-runner.ts +++ b/scripts/dev-runner.ts @@ -455,6 +455,8 @@ export function runDevRunnerWithInput(input: DevRunnerCliInput) { stderr: "inherit", env, extendEnv: false, + // Windows needs shell mode to resolve .cmd shims (e.g. bun.cmd). + shell: process.platform === "win32", // Keep turbo in the same process group so terminal signals (Ctrl+C) // reach it directly. Effect defaults to detached: true on non-Windows, // which would put turbo in a new group and require manual forwarding.