summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/fetcher.rb')
-rw-r--r--lib/bundler/fetcher.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 08d1ee3437..d493ca0064 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -140,14 +140,11 @@ module Bundler
fetch_specs(gem_names).each do |name, version, platform, dependencies, metadata|
spec = if dependencies
EndpointSpecification.new(name, version, platform, self, dependencies, metadata).tap do |es|
- unless index.local_search(es).empty?
- # Duplicate spec.full_names, different spec.original_names
- # index#<< ensures that the last one added wins, so if we're overriding
- # here, make sure to also override the checksum, otherwise downloading the
- # specs (even if that version is completely unused) will cause a SecurityError
- source.checksum_store.delete_full_name(es.full_name)
- end
- source.checksum_store.register(es, [es.checksum]) if source && es.checksum
+ # Duplicate spec.full_names, different spec.original_names
+ # index#<< ensures that the last one added wins, so if we're overriding
+ # here, make sure to also override the checksum, otherwise downloading the
+ # specs (even if that version is completely unused) will cause a SecurityError
+ source.checksum_store.replace(es.full_name, es.checksum)
end
else
RemoteSpecification.new(name, version, platform, self)