aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2016-07-05 11:02:16 +1000
committerMisty De Meo2016-07-06 17:21:05 +1000
commitca005cb8245e7e12ad808d78d49bce3953e1153c (patch)
treea656fc69cc28097edac0383c27cb6f2bead0bc69 /Library
parentcdcbe61acbee5c6d8bda344279a69bf2dee79999 (diff)
downloadbrew-ca005cb8245e7e12ad808d78d49bce3953e1153c.tar.bz2
doctor: check for beta XQuartz releases
Beta versions of XQuartz have address sanitization enabled, which breaks some software at runtime, including wine. Closes Homebrew/homebrew-core#2481. Closes #459. Signed-off-by: Misty De Meo <mistydemeo@github.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/os/mac/diagnostic.rb12
-rw-r--r--Library/Homebrew/test/test_diagnostic.rb5
2 files changed, 17 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb
index 37c1efdc2..00a297d34 100644
--- a/Library/Homebrew/extend/os/mac/diagnostic.rb
+++ b/Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -312,6 +312,18 @@ module Homebrew
https://xquartz.macosforge.org
EOS
end
+
+ def check_for_beta_xquartz
+ return unless MacOS::XQuartz.version.include? "beta"
+
+ <<-EOS.undent
+ The following beta release of XQuartz is installed: #{MacOS::XQuartz.version}
+
+ XQuartz beta releases include address sanitization, and do not work with
+ all software; notably, wine will not work with beta releases of XQuartz.
+ We recommend only installing stable releases of XQuartz.
+ EOS
+ end
end
end
end
diff --git a/Library/Homebrew/test/test_diagnostic.rb b/Library/Homebrew/test/test_diagnostic.rb
index ef82da6dc..0e0d110e7 100644
--- a/Library/Homebrew/test/test_diagnostic.rb
+++ b/Library/Homebrew/test/test_diagnostic.rb
@@ -226,4 +226,9 @@ class DiagnosticChecksTest < Homebrew::TestCase
end
end
end
+
+ def test_check_for_beta_xquartz
+ MacOS::XQuartz.stubs(:version).returns("2.7.10_beta2")
+ assert_match "The following beta release of XQuartz is installed: 2.7.10_beta2", @checks.check_for_beta_xquartz
+ end
end