mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
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:
parent
ac7ce7c408
commit
27f592a356
9
cli.js
9
cli.js
@ -447,11 +447,12 @@ cli.generateDocs = function() {
|
||||
|
||||
// TODO: docs
|
||||
cli.exit = function(exitCode, message) {
|
||||
if (message && exitCode > 0) {
|
||||
console.error(message);
|
||||
if (exitCode > 0) {
|
||||
if (message) {
|
||||
console.error(message);
|
||||
}
|
||||
process.exit(exitCode);
|
||||
}
|
||||
|
||||
process.exit(exitCode || 0);
|
||||
};
|
||||
|
||||
return cli;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user