diff options
| author | Mike McQuaid | 2016-12-18 11:18:13 -0800 |
|---|---|---|
| committer | GitHub | 2016-12-18 11:18:13 -0800 |
| commit | 482568579b8c9e699ca19207643cc483975869a4 (patch) | |
| tree | 3a75e4fc7240d01bcc3ec52bab1e03dfe2df8f84 | |
| parent | e95c843c2e90eec35a1d8566c500aa4a91c3d3b3 (diff) | |
| parent | 950512ad3426b3f21d624de6741afbd2dbabbdd2 (diff) | |
| download | brew-482568579b8c9e699ca19207643cc483975869a4.tar.bz2 | |
Merge pull request #1675 from MikeMcQuaid/diagnostic-multiple-cellars
diagnostic: check for multiple Cellars.
| -rw-r--r-- | Library/Homebrew/diagnostic.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index e8506ce80..81404c625 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -404,6 +404,18 @@ module Homebrew EOS end + def check_multiple_cellars + return if HOMEBREW_PREFIX.to_s == HOMEBREW_REPOSITORY.to_s + return unless (HOMEBREW_REPOSITORY/"Cellar").exist? + return unless (HOMEBREW_PREFIX/"Cellar").exist? + + <<-EOS.undent + You have multiple Cellars. + You should delete #{HOMEBREW_REPOSITORY}/Cellar: + rm -rf #{HOMEBREW_REPOSITORY}/Cellar + EOS + end + def check_homebrew_prefix return if HOMEBREW_PREFIX.to_s == "/usr/local" |
