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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-03-22 18:21:53 +0300
committerisaacs <i@izs.me>2011-03-22 18:28:15 +0300
commitf4bd006fd16feb61ef2a9b21d4baab7ef0c8006f (patch)
tree6ee309b8ee5f50831a6dafae6d39919353259563 /lib/bin.js
parent2ff760b6a45e990dd8662703f3f89328c884d256 (diff)
Print a little message when root/bin aren't going to be seen
Diffstat (limited to 'lib/bin.js')
-rw-r--r--lib/bin.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bin.js b/lib/bin.js
index 6a9adfd9b..73abe3c88 100644
--- a/lib/bin.js
+++ b/lib/bin.js
@@ -7,5 +7,10 @@ function bin (args, cb) {
var path = require("path")
, global = npm.config.get("global")
, b = global ? path.join(npm.prefix, "bin") : path.join(npm.dir, ".bin")
+ , PATH = (process.env.PATH || "").split(":")
output.write(b, cb)
+ if (npm.config.get("global") && PATH.indexOf(b) === -1) {
+ output.write("(not in PATH env variable)"
+ ,npm.config.get("logfd"))
+ }
}