Prevent output from being cut off in Node 4

This is a quick fix for truncated output in Node 4 by only calling
`process.exit` for errors.

Closes #1070
This commit is contained in:
Alex Nicksay 2015-10-06 17:30:10 -04:00
parent ac7ce7c408
commit 27f592a356

7
cli.js
View File

@ -447,11 +447,12 @@ cli.generateDocs = function() {
// TODO: docs // TODO: docs
cli.exit = function(exitCode, message) { cli.exit = function(exitCode, message) {
if (message && exitCode > 0) { if (exitCode > 0) {
if (message) {
console.error(message); console.error(message);
} }
process.exit(exitCode);
process.exit(exitCode || 0); }
}; };
return cli; return cli;