formula.rb: Move cache dir creation to fetch
So that the cache directory will get created if the user runs `brew fetch` instead of `brew install` as the first command.
This commit is contained in:
parent
ea30b66ced
commit
d05478e85b
@ -559,6 +559,9 @@ private
|
|||||||
downloader = @downloader
|
downloader = @downloader
|
||||||
mirror_list = mirrors
|
mirror_list = mirrors
|
||||||
|
|
||||||
|
# Ensure the cache exists
|
||||||
|
HOMEBREW_CACHE.mkpath
|
||||||
|
|
||||||
begin
|
begin
|
||||||
fetched = downloader.fetch
|
fetched = downloader.fetch
|
||||||
rescue CurlDownloadStrategyError => e
|
rescue CurlDownloadStrategyError => e
|
||||||
@ -606,7 +609,6 @@ EOF
|
|||||||
private
|
private
|
||||||
|
|
||||||
def stage
|
def stage
|
||||||
HOMEBREW_CACHE.mkpath
|
|
||||||
fetched, downloader = fetch
|
fetched, downloader = fetch
|
||||||
verify_download_integrity fetched if fetched.kind_of? Pathname
|
verify_download_integrity fetched if fetched.kind_of? Pathname
|
||||||
mktemp do
|
mktemp do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user