Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRomain Beaumont <romain.rom1@gmail.com>2016-01-10 21:58:22 +0300
committerRomain Beaumont <romain.rom1@gmail.com>2016-01-10 22:19:31 +0300
commitf2b5eb853273e032393a858ea2b15a090aad07ab (patch)
tree4a900e292b0df427547e9b674b1a42f20232f5db /bin
parent8861568fce3cb59d0c66dfe4ccea0ee2297948c3 (diff)
show help if there is not exactly one argument for info, create, download, add and seed, fix #567
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index f427567..660a994 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -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()