diff options
author | isaacs <i@izs.me> | 2011-04-08 00:31:00 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-04-08 00:31:00 +0400 |
commit | bb6a059ee63327babe44809301d1866d748f192b (patch) | |
tree | dd9676f6b8bce5e53de3cc902029b875d2c9b399 /lib/root.js | |
parent | 131a5a84ebe55a7a213504828d0b740337cdef05 (diff) |
no need to warn for non-global root
Diffstat (limited to 'lib/root.js')
-rw-r--r-- | lib/root.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/root.js b/lib/root.js index 4be0eb394..3eba4e43b 100644 --- a/lib/root.js +++ b/lib/root.js @@ -8,7 +8,8 @@ root.usage = "npm root\nnpm root -g\n(just prints the root folder)" function root (args, cb) { output.write(npm.dir, cb) - var rp = require.paths.concat(module.paths) + if (!npm.config.get("global")) return + var rp = require.paths if (rp.indexOf(npm.dir) === -1) { output.write("(not in NODE_PATH env variable)" ,npm.config.get("logfd")) |