diff options
author | cjihrig <cjihrig@gmail.com> | 2016-10-20 12:34:09 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-10-24 22:46:56 -0400 |
commit | dd13d71eb3ee34d84ca9059d40616bd0b44ca0ed (patch) | |
tree | 2abc2664d23da6e45aa0dd943c7c43b1d4e574a8 /lib | |
parent | a5080000933108ff6d16bfb8705f18a8879fa138 (diff) | |
download | android-node-v8-dd13d71eb3ee34d84ca9059d40616bd0b44ca0ed.tar.gz android-node-v8-dd13d71eb3ee34d84ca9059d40616bd0b44ca0ed.tar.bz2 android-node-v8-dd13d71eb3ee34d84ca9059d40616bd0b44ca0ed.zip |
child_process: remove unreachable execSync() code
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: https://github.com/nodejs/node/pull/9209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/child_process.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index 3cc6e2ce6a..4c2fb7e098 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -517,7 +517,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; |