diff options
Diffstat (limited to 'lib/bundler/source/rubygems.rb')
-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 |