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-17 03:13:28 +0300
committerisaacs <i@izs.me>2010-12-17 03:13:28 +0300
commit3aeab72f1cfb62fe96916bde221597cd8f68c904 (patch)
tree4e0bbbc0c324a09290b630e88bdc01adb3b3c1fe /cli.js
parent7e797b1c809dbe1dd49ba2caf000b85b912f522d (diff)
regression. failed to sniff command properly
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli.js b/cli.js
index e14997e8a..2923c346c 100755
--- a/cli.js
+++ b/cli.js
@@ -19,7 +19,7 @@ log.verbose(argv, "cli")
var conf = parseArgs(argv)
npm.argv = conf.argv.remain
-if (-1 !== npm.fullList.indexOf(npm.argv[0])) {
+if (npm.deref(npm.argv[0])) {
npm.command = npm.argv.shift()
}
@@ -42,7 +42,7 @@ if (reqVer && !semver.satisfies(nodeVer, reqVer)) {
process.on("uncaughtException", errorHandler)
-if (conf.usage && npm.command && npm.command !== "help") {
+if (conf.usage && npm.command !== "help") {
npm.argv.unshift(npm.command)
npm.command = "help"
}