Permalink
Browse files

Fix gentlyRm test failures

  • Loading branch information...
isaacs committed Jan 30, 2012
1 parent 593d08d commit 81ee7cb48105909d32f133b887adaea7470c3266
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/utils/gently-rm.js
View
@@ -8,25 +8,25 @@ var rimraf = require("rimraf")
, npm = require("../npm.js")
, path = require("path")
-function gentlyRm (target, gently, cb) {
+function gentlyRm (p, gently, cb) {
if (npm.config.get("force") || !gently) {
- return rimraf(target, cb)
+ return rimraf(p, cb)
}
gently = path.resolve(gently)
// lstat it, see if it's a symlink.
- fs.lstat(target, function (er, st) {
- if (er) return rimraf(target, cb)
+ fs.lstat(p, function (er, s) {
+ if (er) return rimraf(p, cb)
if (!s.isSymbolicLink()) next(null, path.resolve(p))
realish(p, next)
})
function next (er, rp) {
if (rp && rp.indexOf(gently) !== 0) {
- return clobberFail(target, gently, cb)
+ return clobberFail(p, gently, cb)
}
- rimraf(target, cb)
+ rimraf(p, cb)
}
}

0 comments on commit 81ee7cb

Please sign in to comment.