Skip to content

Commit

Permalink
Write errors to error buffer
Browse files Browse the repository at this point in the history
In some situations, errors were written to the output buffer.
Writing these to the error buffer (i.e. `console.error`) is better.
  • Loading branch information
Dirk Nederveen committed Jul 29, 2015
1 parent 28c31af commit a5e057f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function handleDiff(fullPath, originalJavascript, formattedJavascript) {
console.log(stdout);
}
if (stderr) {
console.log(stderr);
console.error(stderr);
}
});
});
Expand Down Expand Up @@ -159,7 +159,7 @@ function handleJavascript(fullPath, original) {
if (errors && errors.length) {
errors.forEach(function(error) {
var msg = util.format('Error: %s Line: %s Column: %s', error.description, error.lineNumber, error.column);
console.log(msg);
console.error(msg);
});
process.exit(-1);
}
Expand Down

0 comments on commit a5e057f

Please sign in to comment.