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

Pull cache creation out of begin block

parent b3ed5a36
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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