Use alternate Cache for root user.
This commit is contained in:
parent
5b6deb8845
commit
bf8071f0aa
10
bin/brew
10
bin/brew
@ -6,8 +6,14 @@ require 'ARGV+yeast'
|
|||||||
require 'utils'
|
require 'utils'
|
||||||
require 'brew.h'
|
require 'brew.h'
|
||||||
|
|
||||||
# TODO if whoami == root then use /Library/Caches/Homebrew instead
|
if Process.uid == 0
|
||||||
HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
|
# 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?
|
||||||
|
HOMEBREW_CACHE=Pathname.new("/Library/Caches/Homebrew")
|
||||||
|
else
|
||||||
|
HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
|
||||||
|
end
|
||||||
|
|
||||||
HOMEBREW_PREFIX=Pathname.new(__FILE__).dirname.parent.cleanpath
|
HOMEBREW_PREFIX=Pathname.new(__FILE__).dirname.parent.cleanpath
|
||||||
HOMEBREW_CELLAR=HOMEBREW_PREFIX+'Cellar'
|
HOMEBREW_CELLAR=HOMEBREW_PREFIX+'Cellar'
|
||||||
HOMEBREW_VERSION='0.4'
|
HOMEBREW_VERSION='0.4'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user