New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print help only when there are no arguments #3617
Conversation
+1 also running into this, looks like a regression from #3604 |
I'll take a look tomorrow, thanks. One quick note: could you please add cli-testlab-based test for this? |
OK, but I'm not familiar with |
@yeonhoyoon Here is a super simple example: https://github.com/knex/knex/blob/master/test/cli/version.spec.js and you can check other files in same directory if you'd need more than that |
@kibertoad |
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 Add tests for help command
Much appreciated! There are linting errors in the test:
After those are fixed, this can be merged :) |
@yeonhoyoon BTW, thank you for mentioning missing functionality in |
@kibertoad |
Thanks! <3 |
Released in 0.20.8 |
knex cli should print help only when there are no arguments.
current implementation always prints help even when given correct arguments, such as
knex migrate:status
.the correct way to check argument length is via process.argv.
reference: https://github.com/tj/commander.js/#outputhelpcb