Skip to content
Browse files

Set TMPDIR to wd when downgrading permissions.

sh actually seems to freak out if you don't have permission to
write to the TMPDIR env, at least on Solaris.
  • Loading branch information...
1 parent 5bc325b commit d7dcacea6f17437fd88321987ca6aa8fe3c017d8 @isaacs isaacs committed Feb 24, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/utils/lifecycle.js
1 lib/utils/lifecycle.js
@@ -23,6 +23,7 @@ function lifecycle (pkg, stage, wd, cb) {
// set the env variables, then run scripts as a child process.
var env = makeEnv(pkg)
env.npm_lifecycle_event = stage
+ if (!npm.config.get("unsafe-perm")) env.TMPDIR = wd
var pkgDir = path.join(npm.dir,, pkg.version)
if (wd.indexOf(npm.dir) !== 0) {

0 comments on commit d7dcace

Please sign in to comment.
Something went wrong with that request. Please try again.