diff --git a/lib/exec.js b/lib/exec.js index 05cddb2..67ec5d0 100644 --- a/lib/exec.js +++ b/lib/exec.js @@ -18,8 +18,9 @@ module.exports = function exec() { // console.log(cmd + ' ' + args.join(' ')); - // somehow stderr and stdout are reversed from doc? child_process.execFile(cmd, args, opts, function (error, stderr, stdout) { - callback(error ? new Error(stderr) : null, stdout); + + // somehow stderr and stdout are reversed local + return callback(error ? new Error(stderr || stdout) : null, stdout || stderr); }); };