CLI: fix Windows gateway startup

This commit is contained in:
Tak hoffman
2026-01-22 22:11:15 -06:00
committed by Peter Steinberger
parent 9207840db4
commit b65916e0d1
2 changed files with 11 additions and 3 deletions

View File

@@ -115,7 +115,11 @@ if (!shouldBuild()) {
runNode();
} else {
logRunner("Building TypeScript (dist is stale).");
const build = spawn("pnpm", ["exec", compiler, ...projectArgs], {
const pnpmArgs = ["exec", compiler, ...projectArgs];
const buildCmd = process.platform === "win32" ? "cmd.exe" : "pnpm";
const buildArgs =
process.platform === "win32" ? ["/d", "/s", "/c", "pnpm", ...pnpmArgs] : pnpmArgs;
const build = spawn(buildCmd, buildArgs, {
cwd,
env,
stdio: "inherit",