From a5e057f7d407803b36fd5ba96e95f1236b1b8d4a Mon Sep 17 00:00:00 2001 From: Dirk Nederveen Date: Wed, 29 Jul 2015 12:52:30 +0200 Subject: [PATCH] Write errors to error buffer In some situations, errors were written to the output buffer. Writing these to the error buffer (i.e. `console.error`) is better. --- lib/run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/run.js b/lib/run.js index 7fe186e..81bcaec 100644 --- a/lib/run.js +++ b/lib/run.js @@ -89,7 +89,7 @@ function handleDiff(fullPath, originalJavascript, formattedJavascript) { console.log(stdout); } if (stderr) { - console.log(stderr); + console.error(stderr); } }); }); @@ -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); }