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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cli.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-12-19 21:48:39 +0300
committerisaacs <i@izs.me>2010-12-19 21:48:39 +0300
commit9deb052792bc96fd1d361402ec142bccd164464a (patch)
treedf8e6a2931566592bc75a020fb8d627546dcc7f3 /cli.js
parent3ca73beedf47e5939e342dd4bea9066c6d0dfdc7 (diff)
Regression. Show usage for unknown commands.
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli.js b/cli.js
index 2923c346c..f2e88d6b6 100755
--- a/cli.js
+++ b/cli.js
@@ -19,9 +19,8 @@ log.verbose(argv, "cli")
var conf = parseArgs(argv)
npm.argv = conf.argv.remain
-if (npm.deref(npm.argv[0])) {
- npm.command = npm.argv.shift()
-}
+if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift()
+else conf.usage = true
if (conf.version) {