Skip to content
Snippets Groups Projects
Commit 3a96a1a5 authored by Jack Nagel's avatar Jack Nagel
Browse files

Use a set to track failed downloads

parent fd4f985c
No related branches found
No related tags found
No related merge requests found
......@@ -60,19 +60,15 @@ module Homebrew
private
def retry_fetch? f
@fetch_failed ||= {}
already_failed = @fetch_failed.fetch(f.name, false)
if already_failed || !ARGV.include?("--retry")
@fetch_failed ||= Set.new
if ARGV.include?("--retry") && @fetch_failed.add?(f.name)
ohai "Retrying download"
f.clear_cache
true
else
Homebrew.failed = true
return false
false
end
ohai "Retrying download"
f.clear_cache
@fetch_failed[f.name] = true
true
end
def fetch_fetchable f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment