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/bin
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-09-15 23:58:55 +0400
committerisaacs <i@izs.me>2011-09-15 23:58:55 +0400
commitff5e445f8e288f5300f08a984b15359ab6ac40cc (patch)
treeeb71e1cf016b04224076a0166e83f867c33544e8 /bin
parentd90a72b269d972e0412f9792e5ae3845c276d02f (diff)
Minor cli.js style
Diffstat (limited to 'bin')
-rwxr-xr-xbin/npm.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/npm.js b/bin/npm.js
index e1f534d79..003c3f953 100755
--- a/bin/npm.js
+++ b/bin/npm.js
@@ -17,7 +17,7 @@ var fs = require("graceful-fs")
// if npm is called as "npmg" or "npm_g", then
// run in global mode.
-if(path.basename(process.argv[1]).slice(-1) === "g") {
+if (path.basename(process.argv[1]).slice(-1) === "g") {
process.argv.splice(1, 1, "npm", "-g")
}
@@ -32,8 +32,10 @@ else conf.usage = true
if (conf.version) {
console.log(npm.version)
return
-} else log("npm@"+npm.version, "using")
-log("node@"+process.version, "using")
+}
+
+log.info("npm@"+npm.version, "using")
+log.info("node@"+process.version, "using")
// make sure that this version of node works with this version of npm.
var semver = require("semver")
@@ -59,4 +61,5 @@ npm.load(conf, function (er) {
if (er) return errorHandler(er)
npm.commands[npm.command](npm.argv, errorHandler)
})
+
})()