aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-09-19 19:05:44 -0700
committerCharlie Sharpsteen2011-09-19 19:05:44 -0700
commitd05478e85b776bf262e6bf2ca7b4b883a25de5ed (patch)
tree0c3d2546191db7fe5fa544f80ab938d091a10cec /Library/Homebrew/formula.rb
parentea30b66ced40a7957b7a8dcce33b70d64f193c2d (diff)
downloadbrew-d05478e85b776bf262e6bf2ca7b4b883a25de5ed.tar.bz2
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.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index f8d86844f..6143a4689 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -559,6 +559,9 @@ private
downloader = @downloader
mirror_list = mirrors
+ # Ensure the cache exists
+ HOMEBREW_CACHE.mkpath
+
begin
fetched = downloader.fetch
rescue CurlDownloadStrategyError => e
@@ -606,7 +609,6 @@ EOF
private
def stage
- HOMEBREW_CACHE.mkpath
fetched, downloader = fetch
verify_download_integrity fetched if fetched.kind_of? Pathname
mktemp do