Skip to content

Commit

Permalink
output help only when there are no arguments
Browse files Browse the repository at this point in the history
knex cli should output help only when there are no arguments.
current implementation always outputs help, even with correct arguments, such as `knex migrate:status`
the argument length should be checked via process.argv.
reference: https://github.com/tj/commander.js/#outputhelpcb
  • Loading branch information
yeonhoyoon committed Jan 8, 2020
1 parent 2e3c7fe commit e2c55d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cli.js
Expand Up @@ -341,7 +341,7 @@ function invoke(env) {
.catch(exit);
});

if (!commander._args.length) {
if (!process.argv.slice(2).length) {
commander.outputHelp();
}

Expand Down

0 comments on commit e2c55d2

Please sign in to comment.