Skip to content

Commit

Permalink
handle reverse stdout and stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
FokkeZB committed Jun 12, 2015
1 parent bbe772d commit 210ed83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
};

0 comments on commit 210ed83

Please sign in to comment.