From bb6a059ee63327babe44809301d1866d748f192b Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 7 Apr 2011 13:31:00 -0700 Subject: no need to warn for non-global root --- lib/root.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/root.js') 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")) -- cgit v1.2.3