зеркало из https://github.com/github/ruby.git
[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. https://github.com/rubygems/rubygems/commit/3d80dfba08
This commit is contained in:
Родитель
cbf2078a25
Коммит
d8e97169ba
|
@ -162,7 +162,7 @@ module Bundler
|
||||||
begin
|
begin
|
||||||
s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
|
s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
|
||||||
spec.__swap__(s)
|
spec.__swap__(s)
|
||||||
rescue StandardError
|
rescue Gem::Package::FormatError
|
||||||
Bundler.rm_rf(path)
|
Bundler.rm_rf(path)
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче