fix(security): harden Windows child process spawning

This commit is contained in:
Peter Steinberger
2026-02-15 03:24:21 +01:00
parent 7b697d6128
commit a7eb0dd9a5
7 changed files with 29 additions and 9 deletions

View File

@@ -223,7 +223,6 @@ const runOnce = (entry, extraArgs = []) =>
const child = spawn(pnpm, args, {
stdio: "inherit",
env: { ...process.env, VITEST_GROUP: entry.name, NODE_OPTIONS: nextNodeOptions },
shell: process.platform === "win32",
});
children.add(child);
child.on("exit", (code, signal) => {
@@ -277,7 +276,6 @@ if (passthroughArgs.length > 0) {
const child = spawn(pnpm, args, {
stdio: "inherit",
env: { ...process.env, NODE_OPTIONS: nextNodeOptions },
shell: process.platform === "win32",
});
children.add(child);
child.on("exit", (exitCode, signal) => {

View File

@@ -55,7 +55,6 @@ function run(cmd, args) {
cwd: uiDir,
stdio: "inherit",
env: process.env,
shell: process.platform === "win32",
});
child.on("exit", (code, signal) => {
if (signal) {
@@ -70,7 +69,6 @@ function runSync(cmd, args, envOverride) {
cwd: uiDir,
stdio: "inherit",
env: envOverride ?? process.env,
shell: process.platform === "win32",
});
if (result.signal) {
process.exit(1);