diff --git a/lib/child_process.js b/lib/child_process.js index 76ec6d3d0f9437..e5b35e7add952d 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -196,9 +196,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; }