From 26fccd4b698f71c1285b5dcb88c090b4557bccc3 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 18 Jul 2010 18:00:42 -0700 Subject: Don't load command logic until/unless necessary --- cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli.js') 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 -- cgit v1.2.3