diff options
author | indexzero <charlie.robbins@gmail.com> | 2010-10-27 03:25:54 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-10-27 03:28:45 +0400 |
commit | 16f643ba519f8c2f42f776a927bc9bcfdd1ec8b2 (patch) | |
tree | cc1b4f5e09e2164c3404fa1c53b8623cb3bf7ebf /npm.js | |
parent | 19206eea4a10e09e6adfe855e2c35ff7034ed36f (diff) |
[minor] Move sudo warning till after npm.config is set
Diffstat (limited to 'npm.js')
-rw-r--r-- | npm.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -15,11 +15,6 @@ npm.commands = {} npm.ELIFECYCLE = {} npm.E404 = {} -if (process.getuid() === 0) { - log.error( "\nRunning npm as root is not recommended!\n" - + "Seriously, don't do this!\n", "sudon't!") -} - try { // startup, ok to do this synchronously var j = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"))+"") @@ -129,3 +124,8 @@ Object.defineProperty(npm, "tmp", } , enumerable : true }) + +if (process.getuid() === 0) { + log.error( "\nRunning npm as root is not recommended!\n" + + "Seriously, don't do this!\n", "sudon't!") +} |