Make "XQuartz is installed" heurstic stricter
This commit is contained in:
parent
89b5ee6295
commit
43108e42d9
@ -6,9 +6,11 @@ module MacOS::XQuartz extend self
|
|||||||
# The X11.app distributed by Apple is also XQuartz, and therefore covered
|
# The X11.app distributed by Apple is also XQuartz, and therefore covered
|
||||||
# by this method.
|
# by this method.
|
||||||
def version
|
def version
|
||||||
path = MacOS.app_with_bundle_id(FORGE_BUNDLE_ID) || MacOS.app_with_bundle_id(APPLE_BUNDLE_ID)
|
@version ||= begin
|
||||||
version = if not path.nil? and path.exist?
|
path = MacOS.app_with_bundle_id(FORGE_BUNDLE_ID) || MacOS.app_with_bundle_id(APPLE_BUNDLE_ID)
|
||||||
`mdls -raw -name kMDItemVersion "#{path}" 2>/dev/null`.strip
|
if not path.nil? and path.exist?
|
||||||
|
`mdls -raw -name kMDItemVersion "#{path}" 2>/dev/null`.strip
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ module MacOS::XQuartz extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def installed?
|
def installed?
|
||||||
not prefix.nil?
|
!version.nil? && !prefix.nil?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user