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-31 01:13:32 +0300
committerKat Marchán <kzm@sykosomatic.org>2017-05-31 09:01:00 +0300
commit9aac984cbbfef22182ee42b51a193c0b47146ad6 (patch)
tree3b9ee4acc8f5683bd26129f25868cd9cbf31da16 /lib
parent3cb8432397b3666d88c31131dbb4599016a983ff (diff)
finalize: Guard against being unable to compute _requested source
Credit: @iarna
Diffstat (limited to 'lib')
-rw-r--r--lib/install/action/finalize.js2
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)
}