diff --git a/src/cli.js b/src/cli.js index d63b3a84..7e0de67a 100644 --- a/src/cli.js +++ b/src/cli.js @@ -30,12 +30,6 @@ const errors = require('./errors'); export default function cli(argv = process.argv.slice(2)) { let options = docopt(doc, { version: pkg.version, argv: argv }); - - if (!options['-'] && !options[''].length) { - // Trigger help display. - docopt(doc, { version: pkg.version, argv: ['--help'] }); - } - let logger = new Logger(options['--verbose'], options['--debug'] || process.env.SASSDOC_DEBUG); let env = new Environment(logger, options['--strict']); @@ -83,6 +77,10 @@ export default function cli(argv = process.argv.slice(2)) { .on('data', cb); } + if (!options[''].length) { + options[''].push('.'); + } + handler(options[''], env).then(cb); }