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-07-19 05:00:42 +0400
committerisaacs <i@izs.me>2010-07-25 05:51:19 +0400
commit26fccd4b698f71c1285b5dcb88c090b4557bccc3 (patch)
treec9fb45858661417bd58ec1b1e1de2e1239d2470e /cli.js
parent2343cec599c3552cec1edc328c63903d0abc0e8a (diff)
Don't load command logic until/unless necessary
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli.js b/cli.js
index b1016ff16..db7bcb13c 100755
--- a/cli.js
+++ b/cli.js
@@ -24,7 +24,7 @@ var fs = require("fs")
log(sys.inspect(argv), "cli")
while (arg = argv.shift()) {
- if (!command && (arg in npm.commands)) {
+ if (!command && (npm.commands.hasOwnProperty(arg))) {
if (key) {
conf[key] = true
key = null