aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/xquartz.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/os/mac/xquartz.rb b/Library/Homebrew/os/mac/xquartz.rb
index ddb2aa4fa..efbb5b738 100644
--- a/Library/Homebrew/os/mac/xquartz.rb
+++ b/Library/Homebrew/os/mac/xquartz.rb
@@ -34,7 +34,11 @@ module OS
# The X11.app distributed by Apple is also XQuartz, and therefore covered
# by this method.
def version
- @version ||= detect_version
+ if @version ||= detect_version
+ ::Version.new @version
+ else
+ ::Version::NULL
+ end
end
def detect_version
@@ -115,7 +119,13 @@ module OS
end
def installed?
- !version.nil? && !prefix.nil?
+ !version.null? && !prefix.nil?
+ end
+
+ def outdated?
+ return false unless installed?
+ return false if provided_by_apple?
+ version < latest_version
end
# If XQuartz and/or the CLT are installed, headers will be found under