summaryrefslogtreecommitdiff
path: root/deps/npm/lib/install/diff-trees.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/install/diff-trees.js')
-rw-r--r--deps/npm/lib/install/diff-trees.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js
index 4316f351cc..06e6b77a91 100644
--- a/deps/npm/lib/install/diff-trees.js
+++ b/deps/npm/lib/install/diff-trees.js
@@ -70,6 +70,9 @@ function sriMatch (aa, bb) {
function pkgAreEquiv (aa, bb) {
// coming in we know they share a path…
+ // if one is inside a link and the other is not, then they are not equivalent
+ // this happens when we're replacing a linked dep with a non-linked version
+ if (aa.isInLink !== bb.isInLink) return false
// if they share package metadata _identity_, they're the same thing
if (aa.package === bb.package) return true
// if they share integrity information, they're the same thing