diff options
| author | Adam Vandenberg | 2012-11-11 11:54:03 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-11-11 12:33:50 -0800 |
| commit | 847baa9e143010b79aec043d44a7247911d42063 (patch) | |
| tree | 4837e7d9c3e5f0469c4b4b55aaee27ec759fd693 /Library | |
| parent | f1f6807c0745e29d2e14e7458d77b5649c43f5c5 (diff) | |
| download | brew-847baa9e143010b79aec043d44a7247911d42063.tar.bz2 | |
doctor checks XQuartz version
Closes Homebrew/homebrew#14182.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 14 | ||||
| -rw-r--r-- | Library/Homebrew/macos/xquartz.rb | 4 |
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. |
