Skip to content

Commit

Permalink
Merge pull request #4083 from MikeMcQuaid/remove-xcode-installed-guards
Browse files Browse the repository at this point in the history
Remove Xcode.installed? guards.
  • Loading branch information
MikeMcQuaid committed Apr 17, 2018
2 parents a5849cb + 85edbd2 commit d08a4ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/formula.rb
Expand Up @@ -1294,7 +1294,7 @@ def std_cmake_args

# Avoid false positives for clock_gettime support on 10.11.
# 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"
end

Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/formula_support.rb
Expand Up @@ -22,9 +22,9 @@ def valid?
when :provided_pre_high_sierra
MacOS.version < :high_sierra
when :provided_until_xcode43
MacOS::Xcode.installed? && MacOS::Xcode.version < "4.3"
MacOS::Xcode.version < "4.3"
when :provided_until_xcode5
MacOS::Xcode.installed? && MacOS::Xcode.version < "5.0"
MacOS::Xcode.version < "5.0"
else
true
end
Expand Down
4 changes: 1 addition & 3 deletions Library/Homebrew/os/mac/xcode.rb
Expand Up @@ -280,9 +280,7 @@ def version
def detect_version
# 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
if MacOS::Xcode.installed? && MacOS::Xcode.version < "3.0"
return MacOS::Xcode.version
end
return MacOS::Xcode.version if MacOS::Xcode.version < "3.0"

version = nil
[MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].each do |id|
Expand Down

0 comments on commit d08a4ac

Please sign in to comment.