summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/gently-rm.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/gently-rm.js')
-rw-r--r--deps/npm/lib/utils/gently-rm.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/deps/npm/lib/utils/gently-rm.js b/deps/npm/lib/utils/gently-rm.js
index 634bf94fcc..7253e873c6 100644
--- a/deps/npm/lib/utils/gently-rm.js
+++ b/deps/npm/lib/utils/gently-rm.js
@@ -29,13 +29,6 @@ function gentlyRm (target, gently, base, cb) {
gently = false
}
- log.silly(
- 'gentlyRm',
- target,
- 'is being', gently ? 'gently removed' : 'purged',
- base ? 'from base ' + base : ''
- )
-
// never rm the root, prefix, or bin dirs
//
// globals included because of `npm link` -- as far as the package
@@ -53,15 +46,13 @@ function gentlyRm (target, gently, base, cb) {
var targetPath = normalize(resolve(npm.prefix, target))
if (prefixes.indexOf(targetPath) !== -1) {
- log.verbose('gentlyRm', targetPath, "is part of npm and can't be removed")
return cb(new Error('May not delete: ' + targetPath))
}
- var options = { log: log.silly.bind(log, 'vacuum-fs') }
+ var options = { }
if (npm.config.get('force') || !gently) options.purge = true
if (base) options.base = normalize(resolve(npm.prefix, base))
if (!gently) {
- log.verbose('gentlyRm', "don't care about contents; nuking", targetPath)
return vacuum(targetPath, options, cb)
}
@@ -95,8 +86,6 @@ function gentlyRm (target, gently, base, cb) {
function thenRemove (toRemove, removeBase) {
if (!toRemove) return cb()
if (removeBase) options.base = removeBase
- log.verbose('gentlyRm', options.purge ? 'Purging' : 'Vacuuming',
- toRemove, 'up to', options.base)
return vacuum(toRemove, options, cb)
}
})
@@ -116,7 +105,7 @@ function isSafeToRm (parent, target, cb) {
// The parent directory or something it symlinks to must eventually be in
// a folder that npm maintains.
if (!parent.managed) {
- log.verbose('gentlyRm', parent.path,
+ log.info('gentlyRm', parent.path,
'is not contained in any diretory npm is known to control or ' +
'any place they link to')
return cb(clobberFail(target.path, 'containing path ' + parent.path +