aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorDominyk Tiller2015-12-30 23:17:49 +0000
committerDominyk Tiller2016-01-04 17:22:53 +0000
commitdafa11af9a0b346d12fb9e26adb21d8cff0d5a16 (patch)
treed80dd1cdf7a9400a61abd276aee0676a8ecd9bfb /Library/Homebrew/cmd
parentc5f0003061c6ddb76dd672501ecc58b5476a62fb (diff)
downloadbrew-dafa11af9a0b346d12fb9e26adb21d8cff0d5a16.tar.bz2
doctor: add explicit anaconda warning
Closes Homebrew/homebrew#47540. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 3946a535f..142c7fe0e 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -92,6 +92,31 @@ class Checks
end
end
+ # Anaconda installs multiple system & brew dupes, including OpenSSL, Python,
+ # sqlite, libpng, Qt, etc. Regularly breaks compile on Vim, MacVim and others.
+ # Is flagged as part of the *-config script checks below, but people seem
+ # to ignore those as warnings rather than extremely likely breakage.
+ def check_for_anaconda
+ return unless which("anaconda")
+ return unless which("python")
+
+ anaconda = which("anaconda").realpath.dirname
+ python_binary = Utils.popen_read which("python"), "-c", "import sys; sys.stdout.write(sys.executable)"
+ python = Pathname.new(python_binary).realpath.dirname
+
+ # Only warn if Python lives with Anaconda, since is most problematic case.
+ if python == anaconda then <<-EOS.undent
+ Anaconda is known to frequently break Homebrew builds, including Vim and
+ MacVim, due to bundling many duplicates of system and Homebrew-available
+ tools.
+
+ If you encounter a build failure please temporarily remove Anaconda
+ from your $PATH and attempt the build again prior to reporting the
+ failure to us. Thanks!
+ EOS
+ end
+ end
+
def __check_stray_files(dir, pattern, white_list, message)
return unless File.directory?(dir)