Commit 09ccd48c by Andrew Nesbitt

Merge pull request #209 from arian/fix-207-cli-errorcode

Fixes #207 - Handle CLI errors, and exit with code 1 if there are errors
parents 10018d90 dd7f509e
......@@ -71,7 +71,10 @@ exports = module.exports = function(args) {
var emitter = new Emitter();
emitter.on('error', function(){});
emitter.on('error', function(err){
console.error(err);
process.exit(1);
});
var options = {
stdout: argv.stdout
......
......@@ -45,7 +45,7 @@ function render(options, emitter) {
emitter.emit('render', css);
},
error: function(error) {
emitter.emit('error', error);
emitter.emit('error', chalk.red(error));
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment