diff options
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")) |