diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-05-12 05:02:55 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:18 +0300 |
commit | 6632460a9b0ba3dbccba1da0ab2a14f8623664e9 (patch) | |
tree | 75c0bad61e709b8a28cd8dad8fb8c05195ce2bad /lib | |
parent | 69c60ffe053c31f19f7c8c1ed16601f770383eea (diff) |
fix(link): a package is a link if any of its ancestors is a link
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/install.js b/lib/install.js index b47c94f5d..c567f624f 100644 --- a/lib/install.js +++ b/lib/install.js @@ -638,7 +638,7 @@ Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) { this.idealTree = copyTree(this.currentTree, (child) => { // Filter out any children we didn't install ourselves. They need to be // reinstalled in order for things to be correct. - return child.isTop || child.isLink || ( + return child.isTop || isLink(child) || ( child.package && child.package._resolved && (child.package._integrity || child.package._shasum) @@ -648,6 +648,10 @@ Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) { cb() } +function isLink (child) { + return child.isLink || (child.parent && isLink(child.parent)) +} + Installer.prototype.loadShrinkwrap = function (cb) { validate('F', arguments) log.silly('install', 'loadShrinkwrap') |