From 6495505f88527cf5ae327026987d47ce7be90be5 Mon Sep 17 00:00:00 2001 From: Dan Loewenherz Date: Fri, 3 Jun 2011 21:11:47 -0700 Subject: [PATCH] Add HOMEBREW_CACHE to let the user specify a cache directory Signed-off-by: Adam Vandenberg --- Library/Homebrew/global.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index f248ce36ed..54b169d758 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -10,7 +10,9 @@ ARGV.extend(HomebrewArgvExtension) HOMEBREW_VERSION = '0.8' HOMEBREW_WWW = 'http://mxcl.github.com/homebrew/' -HOMEBREW_CACHE = if Process.uid == 0 +HOMEBREW_CACHE = if ENV['HOMEBREW_CACHE'] + Pathname.new(ENV['HOMEBREW_CACHE']) +elsif Process.uid == 0 # technically this is not the correct place, this cache is for *all users* # so in that case, maybe we should always use it, root or not? Pathname.new("/Library/Caches/Homebrew")