Skip to content

Commit bddae11

Browse files
mplaczek99claude
andcommitted
fix: use shell option for Windows spawnSync compatibility with Node v24
Node.js v24 prevents spawning .cmd files directly without shell: true (CVE-2024-27980). Use shell option instead of manually resolving .cmd. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cf953e5 commit bddae11

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

frontend/scripts/tauri-build.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ if (process.platform === "linux") {
1616
env.NO_STRIP ??= "1";
1717
}
1818

19-
const tauriCommand = process.platform === "win32" ? "tauri.cmd" : "tauri";
20-
const result = spawnSync(tauriCommand, ["build", ...args], {
19+
const result = spawnSync("tauri", ["build", ...args], {
2120
cwd: frontendRoot,
2221
env,
2322
stdio: "inherit",
23+
shell: process.platform === "win32",
2424
});
2525

2626
if (result.error) {

frontend/scripts/tauri-dev.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ const args = process.argv.slice(2);
55

66
prepareTauriTarget();
77

8-
const tauriCommand = process.platform === "win32" ? "tauri.cmd" : "tauri";
9-
const result = spawnSync(tauriCommand, ["dev", ...args], {
8+
const result = spawnSync("tauri", ["dev", ...args], {
109
cwd: frontendRoot,
1110
env: { ...process.env },
1211
stdio: "inherit",
12+
shell: process.platform === "win32",
1313
});
1414

1515
if (result.error) {

0 commit comments

Comments
 (0)