aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorMike McQuaid2016-11-05 10:36:13 -0400
committerMike McQuaid2016-11-05 10:58:38 -0400
commitbccd792bbffaf0c219f402d893be4c5c0d284d97 (patch)
treeacdae052c2b919197798cfd080f667b365259c86 /Library/Homebrew/extend
parent4015d0465a975aaac26d5a47395ab61e29d1702f (diff)
downloadbrew-bccd792bbffaf0c219f402d893be4c5c0d284d97.tar.bz2
diagnostic: add checks for minimum Xcode/CLT versions.
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/os/mac/diagnostic.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb
index 0ac95bfd9..883565749 100644
--- a/Library/Homebrew/extend/os/mac/diagnostic.rb
+++ b/Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -104,6 +104,27 @@ module Homebrew
EOS
end
+ def check_xcode_minimum_version
+ return unless MacOS::Xcode.installed?
+ return unless MacOS::Xcode.minimum_version?
+
+ <<-EOS.undent
+ Your Xcode (#{MacOS::Xcode.version}) is too outdated.
+ Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it).
+ #{MacOS::Xcode.update_instructions}
+ EOS
+ end
+
+ def check_clt_minimum_version
+ return unless MacOS::CLT.installed?
+ return unless MacOS::CLT.minimum_version?
+
+ <<-EOS.undent
+ Your Command Line Tools are too outdated.
+ #{MacOS::CLT.update_instructions}
+ EOS
+ end
+
def check_for_osx_gcc_installer
return unless MacOS.version < "10.7" || ((MacOS::Xcode.version || "0") > "4.1")
return unless DevelopmentTools.clang_version == "2.1"