fix(cli): Fix error reporting in the CLI · documentationjs/documentation@88c8f9a

Original file line numberDiff line numberDiff line change

@@ -49,15 +49,17 @@ module.exports.builder = extend({},

4949

* just a thin wrapper around this one.

5050

*/

5151

module.exports.handler = function build(argv, callback) {

52-

console.log(argv);

5352

argv._handled = true;

5453

argv = sharedOptions.expandInputs(argv);

5554

if (argv.f === 'html' && argv.o === 'stdout') {

5655

throw new Error('The HTML output mode requires a destination directory set with -o');

5756

}

5857
5958

var generator = documentation.build

60-

.bind(null, argv.input, argv, onDocumented); function onDocumented(err, comments) { if (err) {

59+

.bind(null, argv.input, argv, onDocumented);

60+
61+

function onDocumented(err, comments) {

62+

if (err) {

6163

if (typeof callback === 'function') {

6264

return callback(err);

6365

}