aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-09-19 19:05:44 -0700
committerCharlie Sharpsteen2011-09-19 19:05:44 -0700
commit2ff2bda238272387eaeacdbd3e3d88c6f22a63e0 (patch)
tree53aa61c7d9258ce03b2b96d49de4f474b3740efa
parent91f080c1647a9c976e22e7ffa6217a17497b075c (diff)
downloadhomebrew-2ff2bda238272387eaeacdbd3e3d88c6f22a63e0.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.
-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