Skip to content

Commit

Permalink
child_process: remove unreachable execSync() code
Browse files Browse the repository at this point in the history
Code coverage showed that the execSync() variable inheritStderr
was never set to the default value of true. This is because
the default case is hit whenever normalizeExecArgs() returns an
object without an 'options' property. However, this can never
be the case because normalizeExecArgs() unconditionally creates
the options object. This commit removes the unreachable code.

PR-URL: #9209
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
cjihrig authored and MylesBorins committed Nov 19, 2016
1 parent 0cffa3c commit b867294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ exports.execFileSync = execFileSync;

function execSync(command /*, options*/) {
var opts = normalizeExecArgs.apply(null, arguments);
var inheritStderr = opts.options ? !opts.options.stdio : true;
var inheritStderr = !opts.options.stdio;

var ret = spawnSync(opts.file, opts.options);
ret.cmd = command;
Expand Down

0 comments on commit b867294

Please sign in to comment.