aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/os')
-rw-r--r--Library/Homebrew/os/mac.rb2
-rw-r--r--Library/Homebrew/os/mac/xcode.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 4e69a6035..814ef70a2 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -52,7 +52,7 @@ module OS
end
end
- def can_build?
+ def has_apple_developer_tools?
Xcode.installed? || CLT.installed?
end
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 83ba84ff8..40446a8ad 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -76,6 +76,8 @@ module OS
return "0" unless OS.mac?
+ return nil if !MacOS::Xcode.installed? && !MacOS::CLT.installed?
+
%W[#{prefix}/usr/bin/xcodebuild #{which("xcodebuild")}].uniq.each do |path|
if File.file? path
Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/