From 967e35dda3c9efa9aee3cad0aa6f3631e05765c2 Mon Sep 17 00:00:00 2001 From: Artem Savchenko Date: Tue, 6 Oct 2026 20:22:06 +0700 Subject: [PATCH] Fix Svelte check on Windows Signed-off-by: Artem Savchenko --- .../utils/packages/platform-rig/bin/do-svelte-check.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/foundations/utils/packages/platform-rig/bin/do-svelte-check.js b/foundations/utils/packages/platform-rig/bin/do-svelte-check.js index c61c46a3cb8..55975aef47d 100755 --- a/foundations/utils/packages/platform-rig/bin/do-svelte-check.js +++ b/foundations/utils/packages/platform-rig/bin/do-svelte-check.js @@ -47,7 +47,11 @@ async function execProcess(cmd, logFile, args, useConsole) { mkdirSync(join(process.cwd(), '.svelte-check')) } - const compileOut = spawn(cmd, args) + // pnpm exposes package binaries as .cmd shims on Windows. child_process.spawn + // cannot execute those shims directly, so delegate to cmd.exe there. + const compileOut = spawn(process.platform === 'win32' ? `${cmd}.cmd` : cmd, args, { + shell: process.platform === 'win32' + }) const stdoutFilePath = `.svelte-check/${logFile}.log` const stderrFilePath = `.svelte-check/${logFile}-err.log`