diff --git a/lib/child_process.js b/lib/child_process.js index ad8842e520c3be..5e37c81a1e0c33 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -191,9 +191,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; }