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:
authorindexzero <charlie.robbins@gmail.com>2010-10-24 00:54:00 +0400
committerisaacs <i@izs.me>2010-10-24 03:32:20 +0400
commitd7c69821a01c8327f5468fe7a115f2537f908da9 (patch)
treec5f5394b4dfe33b95e274a5725bbe300b465f9a0 /cli.js
parent85769c59d990a24b46b365561a82fe8a5c5c878d (diff)
[api] Small changes to make npm available programatically
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/cli.js b/cli.js
index a3e9f3273..a387c7377 100755
--- a/cli.js
+++ b/cli.js
@@ -74,9 +74,7 @@ else {
arglist.unshift(command)
command = "help"
}
- ini.resolveConfigs(conf, function (er) {
- if (er) return errorHandler(er)
- npm.config.set("root", ini.get("root"))
+ npm.load({ conf: conf, exit: true }, function (err, loaded) {
npm.commands[command](arglist, errorHandler)
- })
+ });
}