aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb14
-rw-r--r--Library/Homebrew/macos/xquartz.rb4
2 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 7d1b96211..c02323365 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -973,6 +973,20 @@ end
EOS
end
+ def check_for_latest_xquartz
+ quartz = MacOS::XQuartz.version
+ return unless quartz
+
+ quartz = Version.new(quartz)
+ latest = Version.new(MacOS::XQuartz.latest_version)
+
+ return if quartz >= latest
+
+ <<-EOS.undent
+ Your XQuartz (#{quartz}) is outdated
+ Please install XQuartz #{latest}.
+ EOS
+ end
end # end class Checks
module Homebrew extend self
diff --git a/Library/Homebrew/macos/xquartz.rb b/Library/Homebrew/macos/xquartz.rb
index cc7207d63..346fdd412 100644
--- a/Library/Homebrew/macos/xquartz.rb
+++ b/Library/Homebrew/macos/xquartz.rb
@@ -12,6 +12,10 @@ module MacOS::XQuartz extend self
end
end
+ def latest_version
+ "2.7.4"
+ end
+
# This should really be private, but for compatibility reasons it must
# remain public. New code should use MacOS::XQuartz.{bin,lib,include}
# instead, as that accounts for Xcode-only systems.