From c5b0cde71d2dab935391600f516734f59ad9b0e4 Mon Sep 17 00:00:00 2001 From: Himanshu Anand Date: Fri, 7 Aug 2026 10:12:35 +0100 Subject: [PATCH] fix: run pnpm through a shell in spawnSync on Windows On Windows, `pnpm` is a `.CMD` shim rather than a real executable. Node's `spawnSync` does not apply PATHEXT, so `spawnSync("pnpm", ...)` fails with `spawnSync pnpm ENOENT`, which breaks `pnpm check` and `pnpm deploy` on Windows before any validation or deployment runs. Pass `shell: process.platform === "win32"` so the shim resolves on Windows. POSIX behavior is unchanged. --- scripts/deploy.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deploy.mjs b/scripts/deploy.mjs index e96fb23..9719cc7 100644 --- a/scripts/deploy.mjs +++ b/scripts/deploy.mjs @@ -344,7 +344,7 @@ async function readDeployment(path) { } function run(args, cwd = root, env = process.env) { - const result = spawnSync("pnpm", args, { cwd, env, stdio: "inherit" }); + const result = spawnSync("pnpm", args, { cwd, env, stdio: "inherit", shell: process.platform === "win32" }); if (result.error) throw result.error; if (result.status !== 0) { const where = relative(root, cwd) || ".";