diff options
author | Rebecca Turner <me@re-becca.org> | 2017-05-31 01:13:32 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-05-31 09:01:00 +0300 |
commit | 9aac984cbbfef22182ee42b51a193c0b47146ad6 (patch) | |
tree | 3b9ee4acc8f5683bd26129f25868cd9cbf31da16 /lib | |
parent | 3cb8432397b3666d88c31131dbb4599016a983ff (diff) |
finalize: Guard against being unable to compute _requested source
Credit: @iarna
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install/action/finalize.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/install/action/finalize.js b/lib/install/action/finalize.js index ba38e602f..ded2350df 100644 --- a/lib/install/action/finalize.js +++ b/lib/install/action/finalize.js @@ -90,6 +90,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') return next() + if (requested && requested.type === 'directory') return next() gentlyRm(pkg.realpath, false, top, next) } |