From e2c55d2a8e73b99877835ea474d95cce46ddd5bd Mon Sep 17 00:00:00 2001 From: yeonhoyoon Date: Wed, 8 Jan 2020 14:03:00 +0900 Subject: [PATCH] output help only when there are no arguments 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 --- bin/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index e71422a784..e97bbd1df9 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -341,7 +341,7 @@ function invoke(env) { .catch(exit); }); - if (!commander._args.length) { + if (!process.argv.slice(2).length) { commander.outputHelp(); }