Skip to content

Commit

Permalink
skip pre-install when we're unlocking (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccutrer authored Oct 10, 2023
1 parent cf87e14 commit adce58d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/bundler/multilock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,16 @@ def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes:

orig_definition = definition.dup # we might need it twice

# install gems for the exact current version of the lockfile
# this ensures it doesn't re-resolve with only (different)
# local gems after you've pulled down an update to the lockfile
# from someone else
if current_lockfile.exist? && install
Bundler.settings.temporary(frozen: true) do
current_definition = builder.to_definition(current_lockfile, {})
# if something has changed, we skip this step; it's unlocking anyway
next unless current_definition.no_resolve_needed?

current_definition.resolve_with_cache!
if current_definition.missing_specs.any?
Bundler.with_default_lockfile(current_lockfile) do
Expand Down

0 comments on commit adce58d

Please sign in to comment.