aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-12-13 00:19:46 +0000
committerMike McQuaid2016-12-13 00:19:46 +0000
commit950512ad3426b3f21d624de6741afbd2dbabbdd2 (patch)
tree001734eb38d0c8af7530c327d3a7d9a49e072729 /Library/Homebrew
parent666463ca2be08261cf103e4870b267f5b461a7f3 (diff)
downloadbrew-950512ad3426b3f21d624de6741afbd2dbabbdd2.tar.bz2
diagnostic: check for multiple Cellars.
And tell people to delete the HOMEBREW_REPOSITORY one. The HOMEBREW_PREFIX one is preferable for bottling.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/diagnostic.rb12
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"