mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Only delete cached gem when it's corrupted
Rescuing all errors here might end up hiding other errors if the
deletion of the cached gem itself raises an error for some reason. Let's
be more conservative.
3d80dfba08
This commit is contained in:
parent
cbf2078a25
commit
d8e97169ba
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ module Bundler
|
|||
begin
|
||||
s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
|
||||
spec.__swap__(s)
|
||||
rescue StandardError
|
||||
rescue Gem::Package::FormatError
|
||||
Bundler.rm_rf(path)
|
||||
raise
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue