lib/bundler/endpoint_specification.rb in bundler-2.4.22 vs lib/bundler/endpoint_specification.rb in bundler-2.5.0

- old
+ new

@@ -123,10 +123,14 @@ data.each do |k, v| next unless v case k.to_s when "checksum" - @checksum = v.last + begin + @checksum = Checksum.from_api(v.last, @spec_fetcher.uri) + rescue ArgumentError => e + raise ArgumentError, "Invalid checksum for #{full_name}: #{e.message}" + end when "rubygems" @required_rubygems_version = Gem::Requirement.new(v) when "ruby" @required_ruby_version = Gem::Requirement.new(v) end