Skip to content

Commit f9fae94

Browse files
cjihrigjuanarbol
authored andcommitted
child_process: remove lookup of undefined property
execSync() passes opts.args to checkExecSyncError(). There are two problems: 1. opts.args appears to always be undefined. 2. Even if it was defined, checkExecSyncError() would not use it since the command input is guaranteed to be defined. This commit updates the code to pass undefined instead. PR-URL: #44766 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent b1a2f37 commit f9fae94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/child_process.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ function execSync(command, options) {
929929
if (inheritStderr && ret.stderr)
930930
process.stderr.write(ret.stderr);
931931

932-
const err = checkExecSyncError(ret, opts.args, command);
932+
const err = checkExecSyncError(ret, undefined, command);
933933

934934
if (err)
935935
throw err;

0 commit comments

Comments
 (0)