diff options
author | isaacs <i@izs.me> | 2011-03-22 18:21:53 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-03-22 18:28:15 +0300 |
commit | f4bd006fd16feb61ef2a9b21d4baab7ef0c8006f (patch) | |
tree | 6ee309b8ee5f50831a6dafae6d39919353259563 /lib/bin.js | |
parent | 2ff760b6a45e990dd8662703f3f89328c884d256 (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.js | 5 |
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")) + } } |