diff options
Diffstat (limited to 'Library/Homebrew/resource.rb')
| -rw-r--r-- | Library/Homebrew/resource.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb index 490c5dfb4..e0daf4a48 100644 --- a/Library/Homebrew/resource.rb +++ b/Library/Homebrew/resource.rb @@ -76,10 +76,14 @@ class Resource # For brew-fetch and others. def fetch - # Ensure the cache exists - HOMEBREW_CACHE.mkpath - downloader.fetch - cached_download + begin + # Ensure the cache exists + HOMEBREW_CACHE.mkpath + downloader.fetch + cached_download + rescue ErrorDuringExecution, CurlDownloadStrategyError => e + raise DownloadError.new(downloader.name) + end end def verify_download_integrity fn |
