This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #6010 - bundler:seg-remove-failed-gem-download, r=indirect
[Source::Rubygems] Remove .gem if downloaded package is invalid ### What was the end-user problem that led to this PR? The problem was the user could (once) have downloaded a `.gem` file that isn't actually a `.gem`, and that package would poison their cache. Closes #5941. ### What was your diagnosis of the problem? My diagnosis was we should remove the `.gem` right after downloading it if we can't open it. ### What is your fix for the problem, implemented in this PR? My fix `rm_rf`'s the `.gem` on failure. ### Why did you choose this fix out of the possible options? I chose this fix because it won't accidentally nuke existing cache entries for a user, but it should help prevent Bundler propagating an issue.
- Loading branch information