diff options
| author | Adam Vandenberg | 2010-06-24 17:11:50 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-28 16:48:44 -0700 |
| commit | 015238448739c47f99e8adc4366cdfede6c83e93 (patch) | |
| tree | c82ed95225c3a4ff3b06c45369df0cb8216e6208 /Library | |
| parent | ddfd14f8d6960fb3a904488400b1406e8423013d (diff) | |
| download | brew-015238448739c47f99e8adc4366cdfede6c83e93.tar.bz2 | |
brew doctor - warn about symlinked cellars
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew_doctor.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index 01f665142..e27967701 100644 --- a/Library/Homebrew/brew_doctor.rb +++ b/Library/Homebrew/brew_doctor.rb @@ -272,6 +272,25 @@ def check_for_dyld_vars end end +def check_for_symlinked_cellar + if HOMEBREW_CELLAR.symlink? + puts <<-EOS.undent + Symlinked Cellars can cause problems. + Your Homebrew Cellar is a symlink: #{HOMEBREW_CELLAR} + which resolves to: #{HOMEBREW_CELLAR.realpath} + + The recommended Homebrew installations are either: + (A) Have Cellar be a real folder inside of your HOMEBREW_PREFIX + (B) Symlink "bin/brew" into your prefix, but don't symlink "Cellar". + + Older installations of Homebrew may have created a symlinked Cellar, but this can + cause problems when two formula install to locations that are mapped on top of each + other during the linking step. + + EOS + end +end + def brew_doctor read, write = IO.pipe @@ -292,6 +311,7 @@ def brew_doctor check_for_gettext check_for_config_scripts check_for_dyld_vars + check_for_symlinked_cellar exit! 0 else |
