mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(security): harden Windows child process spawning
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user