Skip to content

Commit

Permalink
diagnostic: add checks for minimum Xcode/CLT versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Nov 5, 2016
1 parent 4015d04 commit bccd792
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,27 @@ def check_xcode_8_without_clt_on_el_capitan
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"
Expand Down

0 comments on commit bccd792

Please sign in to comment.