Skip to content

Commit 3ca0af1

Browse files
committed
fix: default args to [] in plainExec to handle undefined on Node 22
1 parent 217ae9c commit 3ca0af1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spec-common/commonUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export function plainExec(defaultCwd: string | undefined): ExecFunction {
302302
const cwd = params.cwd || defaultCwd;
303303
const env = params.env ? { ...process.env, ...params.env } : process.env;
304304
const exec = await findLocalWindowsExecutable(cmd, cwd, env, output);
305-
const p = cp.spawn(exec, args, { cwd, env, stdio: stdio as any, windowsHide: true });
305+
const p = cp.spawn(exec, args ?? [], { cwd, env, stdio: stdio as any, windowsHide: true });
306306

307307
return {
308308
stdin: p.stdin,

0 commit comments

Comments
 (0)