mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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: https://github.com/nodejs/node/pull/44766 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 file changed
+1
-1
@@ -940,7 +940,7 @@ function execSync(command, options) {
|
||||
if (inheritStderr && ret.stderr)
|
||||
process.stderr.write(ret.stderr);
|
||||
|
||||
const err = checkExecSyncError(ret, opts.args, command);
|
||||
const err = checkExecSyncError(ret, undefined, command);
|
||||
|
||||
if (err)
|
||||
throw err;
|
||||
|
||||
Reference in new issue
Block a user