diff --git a/lib/child_process.js b/lib/child_process.js index 24f52f94d49209..3aba06c57b2b19 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -216,9 +216,7 @@ exports.execFile = function(file /*, args, options, callback*/) { stderr = Buffer.concat(_stderr); } - if (ex) { - // Will be handled later - } else if (code === 0 && signal === null) { + if (!ex && code === 0 && signal === null) { callback(null, stdout, stderr); return; }