Remove Xcode.installed? guards.

It's safe since 600d58f4ca3d85894c66a38802965fd94d4ea469 when
MacOS::Xcode.version started returning `Version::NULL` where
appropriate.
This commit is contained in:
Mike McQuaid 2018-04-17 10:58:51 +01:00
parent 6233b9d199
commit 85edbd28b1
3 changed files with 4 additions and 6 deletions

View File

@ -1294,7 +1294,7 @@ class Formula
# Avoid false positives for clock_gettime support on 10.11. # Avoid false positives for clock_gettime support on 10.11.
# CMake cache entries for other weak symbols may be added here as needed. # CMake cache entries for other weak symbols may be added here as needed.
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0"
args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0"
end end

View File

@ -22,9 +22,9 @@ class KegOnlyReason
when :provided_pre_high_sierra when :provided_pre_high_sierra
MacOS.version < :high_sierra MacOS.version < :high_sierra
when :provided_until_xcode43 when :provided_until_xcode43
MacOS::Xcode.installed? && MacOS::Xcode.version < "4.3" MacOS::Xcode.version < "4.3"
when :provided_until_xcode5 when :provided_until_xcode5
MacOS::Xcode.installed? && MacOS::Xcode.version < "5.0" MacOS::Xcode.version < "5.0"
else else
true true
end end

View File

@ -280,9 +280,7 @@ module OS
def detect_version def detect_version
# CLT isn't a distinct entity pre-4.3, and pkgutil doesn't exist # CLT isn't a distinct entity pre-4.3, and pkgutil doesn't exist
# at all on Tiger, so just count it as installed if Xcode is installed # at all on Tiger, so just count it as installed if Xcode is installed
if MacOS::Xcode.installed? && MacOS::Xcode.version < "3.0" return MacOS::Xcode.version if MacOS::Xcode.version < "3.0"
return MacOS::Xcode.version
end
version = nil version = nil
[MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].each do |id| [MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].each do |id|