Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
diff-trees: Only avoid adding bundled deps when they're the result of…
Browse files Browse the repository at this point in the history
… a link

Credit: @iarna
  • Loading branch information
iarna committed Apr 10, 2018
1 parent 4785f13 commit bd16485
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/install/diff-trees.js
Expand Up @@ -221,9 +221,8 @@ var diffTrees = module.exports._diffTrees = function (oldTree, newTree) {
pkg.fromPath = toMv.pkg.path
setAction(differences, 'move', pkg)
delete toRemove[toMv.flatname]
// we don't generate add actions for things found in links (which already exist on disk) or
// for bundled modules (which will be installed when we install their parent)
} else if (!(pkg.isInLink && pkg.fromBundle)) {
// we don't generate add actions for things found in links (which already exist on disk)
} else if (!pkg.isInLink || !(pkg.fromBundle && pkg.fromBundle.isLink)) {
setAction(differences, 'add', pkg)
}
}
Expand Down

0 comments on commit bd16485

Please sign in to comment.