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>2012-02-23 23:11:38 +0400
committerisaacs <i@izs.me>2012-02-23 23:11:38 +0400
commitb6c8d31799cf6197f7fac007a474ff02b0efc809 (patch)
treee7f984a1ed14db6d7df66d36cea914c25fc4bf1f /bin
parentf322b0d00a47e847bb894618f45a6aca35035b6b (diff)
Add --versions flag to show the version of node as well
For @mcavage
Diffstat (limited to 'bin')
-rwxr-xr-xbin/npm-cli.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index e0b9f20bb..f29437093 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -49,6 +49,13 @@ if (conf.version) {
return
}
+if (conf.versions) {
+ var v = process.versions
+ v.npm = npm.version
+ console.log(v)
+ return
+}
+
log.info("npm@"+npm.version, "using")
log.info("node@"+process.version, "using")