diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-06-09 11:06:32 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-06-11 18:43:27 +0900 |
commit | bf8dc36e40168737da5009d20ab1902557e58935 (patch) | |
tree | f24493cf70b217d845504a77a145c03b571deac5 | |
parent | 6292b36529c06c730d452c2bf2f18a82b02062bb (diff) |
[rubygems/rubygems] Swapping should not raise any errors
https://github.com/rubygems/rubygems/commit/600a9ac658
-rw-r--r-- | lib/bundler/source/rubygems.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 1617f1831e..2232e04de5 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -157,11 +157,12 @@ module Bundler path = fetch_gem(spec, options[:previous_spec]) begin s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"]) - spec.__swap__(s) rescue Gem::Package::FormatError Bundler.rm_rf(path) raise end + + spec.__swap__(s) else path = cached_gem(spec) raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path |