diff options
author | Rebecca Turner <me@re-becca.org> | 2017-05-10 23:27:14 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:13 +0300 |
commit | d3dc69b6a2620c58e2bf41a3ccc0b024677484ce (patch) | |
tree | 5d256d26da27f517d2f18f0f4696d2245f0a3396 /lib | |
parent | 3d8e8de1a7fcf01ea79ae59b574407f7b0b26d49 (diff) |
finalize: Don't nuke symlink destinations pls
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install/action/finalize.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/install/action/finalize.js b/lib/install/action/finalize.js index 8e1fc9253..a68f7b31f 100644 --- a/lib/install/action/finalize.js +++ b/lib/install/action/finalize.js @@ -95,5 +95,8 @@ module.exports = function (staging, pkg, log) { } module.exports.rollback = function (top, staging, pkg, next) { - gentlyRm(pkg.realpath, false, top, next) + const requested = pkg.package._requested || getRequested(pkg) + if (requested.type !== 'directory') { + gentlyRm(pkg.realpath, false, top, next) + } } |