diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2016-01-10 22:23:19 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2016-01-10 22:23:19 +0300 |
commit | 5a47595f10c468b6a552da28fbe7d565804e3e8c (patch) | |
tree | 4a900e292b0df427547e9b674b1a42f20232f5db /bin | |
parent | 8861568fce3cb59d0c66dfe4ccea0ee2297948c3 (diff) | |
parent | f2b5eb853273e032393a858ea2b15a090aad07ab (diff) |
Merge pull request #568 from rom1504/show_help_for_wrong_arg_number
show help if there is not exactly one argument for info, create, down…
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cmd.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -133,7 +133,9 @@ playerName = argv.airplay ? 'Airplay' var command = argv._[0] -if (command === 'help' || argv.help) { +if (['info', 'create', 'download', 'add', 'seed'].indexOf(command) !== -1 && argv._.length !== 2) { + runHelp() +} else if (command === 'help' || argv.help) { runHelp() } else if (command === 'version' || argv.version) { runVersion() |