aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/fetch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
-rw-r--r--Library/Homebrew/cmd/fetch.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index 6dbe1b3eb..0c3d39b4b 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -68,6 +68,8 @@ module Homebrew
return false
end
+ ohai "Retrying download"
+
f.clear_cache
@fetch_failed[f.name] = true
true
@@ -77,7 +79,14 @@ module Homebrew
f.clear_cache if ARGV.force?
already_fetched = f.cached_download.exist?
- download = f.fetch
+ download = nil
+
+ begin
+ download = f.fetch
+ rescue => e
+ retry if retry_fetch? f
+ raise e
+ end
return unless download.file?