Skip to content

Commit

Permalink
install: Regenerate the logical tree after loading our lockfile
Browse files Browse the repository at this point in the history
This fixes a problem where `removeObsoleteDep` wasn't able to walk the
logical tree when acting without a `node_modules` folder as none existed.
  • Loading branch information
iarna committed Feb 21, 2018
1 parent 9bc6230 commit 6954dfc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,10 @@ Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) {
Installer.prototype.loadShrinkwrap = function (cb) {
validate('F', arguments)
log.silly('install', 'loadShrinkwrap')
readShrinkwrap.andInflate(this.idealTree, cb)
readShrinkwrap.andInflate(this.idealTree, iferr(cb, () => {
computeMetadata(this.idealTree)
cb()
}))
}

Installer.prototype.getInstalledModules = function () {
Expand Down

0 comments on commit 6954dfc

Please sign in to comment.