aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/fetch.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index 0c3d39b4b..cb86545ae 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -79,13 +79,12 @@ module Homebrew
f.clear_cache if ARGV.force?
already_fetched = f.cached_download.exist?
- download = nil
begin
download = f.fetch
- rescue => e
+ rescue DownloadError
retry if retry_fetch? f
- raise e
+ raise
end
return unless download.file?