mirror of
https://github.com/gosticks/brew.git
synced 2026-10-05 06:58:04 +00:00
Pull cache creation out of begin block
This commit is contained in:
@@ -78,12 +78,14 @@ class Resource
|
||||
end
|
||||
|
||||
def fetch
|
||||
# Ensure the cache exists
|
||||
HOMEBREW_CACHE.mkpath
|
||||
downloader.fetch
|
||||
rescue ErrorDuringExecution, CurlDownloadStrategyError => e
|
||||
raise DownloadError.new(self, e)
|
||||
else
|
||||
|
||||
begin
|
||||
downloader.fetch
|
||||
rescue ErrorDuringExecution, CurlDownloadStrategyError => e
|
||||
raise DownloadError.new(self, e)
|
||||
end
|
||||
|
||||
cached_download
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user