Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-05-12 00:36:03 +0300
committerRebecca Turner <me@re-becca.org>2017-05-26 04:55:13 +0300
commit7f8411957e94c3eb6deeebd6907202014fea0e5f (patch)
tree4c85720031a3ae57fc67c7bf4fbe0d4cee0d873e /lib
parenteca4f1f34e0fff579902d4d678f9c5ac845e0c59 (diff)
finalize: call next when rolling back symlinks
Diffstat (limited to 'lib')
-rw-r--r--lib/install/action/finalize.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/install/action/finalize.js b/lib/install/action/finalize.js
index 439edc9ef..30f604791 100644
--- a/lib/install/action/finalize.js
+++ b/lib/install/action/finalize.js
@@ -85,7 +85,6 @@ module.exports = function (staging, pkg, log) {
module.exports.rollback = function (top, staging, pkg, next) {
const requested = pkg.package._requested || getRequested(pkg)
- if (requested.type !== 'directory') {
- gentlyRm(pkg.realpath, false, top, next)
- }
+ if (requested.type === 'directory') return next()
+ gentlyRm(pkg.realpath, false, top, next)
}