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:
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/cli.js b/cli.js
index 1fe5fd71a..fdf780096 100755
--- a/cli.js
+++ b/cli.js
@@ -6,16 +6,13 @@ var log = require("./lib/utils/log")
log("ok", "it worked if it ends with")
-var fs = require("fs")
- , path = require("path")
- , sys = require("sys")
- , npm = require("./npm")
- // supported commands.
+
+
+var sys = require("sys")
+ , npm = require("./npm")
, argv = process.argv.slice(2)
, arg = ""
-
- , conf = {}
, key
, arglist = []
, command
@@ -67,7 +64,7 @@ if (!command) {
)
process.exit(1)
} else itWorked = true
-} else npm.commands[command](arglist, errorHandler)
+} else npm.execute(command, arglist, errorHandler)
function errorHandler (er) {
if (!er) {