diff options
| author | Mike McQuaid | 2016-11-05 10:36:13 -0400 |
|---|---|---|
| committer | Mike McQuaid | 2016-11-05 10:58:38 -0400 |
| commit | bccd792bbffaf0c219f402d893be4c5c0d284d97 (patch) | |
| tree | acdae052c2b919197798cfd080f667b365259c86 | |
| parent | 4015d0465a975aaac26d5a47395ab61e29d1702f (diff) | |
| download | brew-bccd792bbffaf0c219f402d893be4c5c0d284d97.tar.bz2 | |
diagnostic: add checks for minimum Xcode/CLT versions.
| -rw-r--r-- | Library/Homebrew/extend/os/mac/diagnostic.rb | 21 |
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" |
