From d3954d3d77e9e95327e2d54d98a9dae806acc24e Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Thu, 17 Sep 2009 14:34:52 -0700 Subject: [PATCH] Add HOMEBREW_REPOSITORY prefix for `brew up` Signed-off-by: Max Howell I removed whitespace changes and changed readlink to realpath as readlink raises if it's not a link. --- Library/Homebrew/global.rb | 1 + Library/Homebrew/update.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 95e4c9ded8..26975934e1 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -36,6 +36,7 @@ end HOMEBREW_PREFIX = (Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar' +HOMEBREW_REPOSITORY = HOMEBREW_CELLAR.realpath.parent HOMEBREW_VERSION = 0.4 HOMEBREW_WWW = 'http://bit.ly/Homebrew' diff --git a/Library/Homebrew/update.rb b/Library/Homebrew/update.rb index 0e1bcb91f0..09399fbde3 100644 --- a/Library/Homebrew/update.rb +++ b/Library/Homebrew/update.rb @@ -68,7 +68,7 @@ class RefreshBrew private def in_prefix - Dir.chdir(HOMEBREW_PREFIX) { yield } + Dir.chdir(HOMEBREW_REPOSITORY) { yield } end def execute(cmd)