fix: use exact match for win32 platform detection

The previous check used includes("win") which incorrectly matched
"darwin" (macOS) because it contains "win". This caused cmd.exe to be
used on macOS instead of /bin/sh.
This commit is contained in:
ymat19
2026-01-25 18:18:53 +09:00
committed by Peter Steinberger
parent 7253bf398d
commit 4e23b7f654

View File

@@ -2,7 +2,7 @@ export function buildNodeShellCommand(command: string, platform?: string | null)
const normalized = String(platform ?? "")
.trim()
.toLowerCase();
if (normalized.includes("win")) {
if (normalized === "win32") {
return ["cmd.exe", "/d", "/s", "/c", command];
}
return ["/bin/sh", "-lc", command];