Skip to content

Commit

Permalink
simplify checking for missing specs
Browse files Browse the repository at this point in the history
no need to explicitly resolve (and it shouldn't be only locally)
  • Loading branch information
ccutrer committed Sep 19, 2023
1 parent f36d390 commit bd66539
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion lib/bundler/multilock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes:
if install
current_definition = builder.to_definition(current_lockfile, {})
begin
current_definition.resolve_only_locally!
if current_definition.missing_specs.any?
Bundler.with_default_lockfile(current_lockfile) do
Installer.install(gemfile.dirname, current_definition, {})
Expand Down
5 changes: 1 addition & 4 deletions lib/bundler/multilock/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ def base_check(lockfile_definition, log_missing: false, return_missing: false)

begin
definition.validate_runtime!
Bundler.ui.silence do
definition.resolve_only_locally!
end
not_installed = definition.missing_specs
not_installed = Bundler.ui.silence { definition.missing_specs }
rescue RubyVersionMismatch, GemNotFound, SolveFailure
return return_missing ? [] : false
end
Expand Down

0 comments on commit bd66539

Please sign in to comment.