Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Stop overriding specs during double-checks
Browse files Browse the repository at this point in the history
This fixes my test-case reproduction of #6072. I’m pretty sure it’s
because the double-check was overriding the locally installed index
specs with specs fetched from the RubyGems API, causing Bundler to
conclude that the gems aren’t installed, even though they are.
  • Loading branch information
indirect committed Nov 27, 2017
1 parent 914a4a8 commit 4dfb322
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def double_check_for_index(idx, dependency_names)
end

sources.all_sources.each do |source|
source.double_check_for(unmet_dependency_names, :override_dupes)
source.double_check_for(unmet_dependency_names)
end

break if idxcount == idx.size
Expand Down
6 changes: 2 additions & 4 deletions lib/bundler/source/rubygems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,8 @@ def fetchers
end
end

def double_check_for(unmet_dependency_names, override_dupes = false, index = specs)
def double_check_for(unmet_dependency_names)
return unless @allow_remote
raise ArgumentError, "missing index" unless index

return unless api_fetchers.any?

unmet_dependency_names = unmet_dependency_names.call
Expand All @@ -276,7 +274,7 @@ def double_check_for(unmet_dependency_names, override_dupes = false, index = spe

Bundler.ui.debug "Double checking for #{unmet_dependency_names || "all specs (due to the size of the request)"} in #{self}"

fetch_names(api_fetchers, unmet_dependency_names, index, override_dupes)
fetch_names(api_fetchers, unmet_dependency_names, specs, false)
end

def dependency_names_to_double_check
Expand Down

0 comments on commit 4dfb322

Please sign in to comment.