diff options
| author | Mike McQuaid | 2016-09-07 09:51:06 +0100 |
|---|---|---|
| committer | GitHub | 2016-09-07 09:51:06 +0100 |
| commit | d1ba4f44c099ab2a5db311e9237c1892ebf83c6c (patch) | |
| tree | 0b3e134a1bb0477db0d94067e61944acb9232396 /Library/Homebrew/extend | |
| parent | 9c5af247e82beb4668671d61e3f82958052c73f4 (diff) | |
| parent | f1cc1265afa43afb9bffba17c9fc18776b62dd99 (diff) | |
| download | brew-d1ba4f44c099ab2a5db311e9237c1892ebf83c6c.tar.bz2 | |
Merge pull request #833 from DomT4/death_by_xcode
xcode: die unless Xcode/CLT up-to-date on prerelease macOS
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/os/mac/diagnostic.rb | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 9b018bd02..a2f715890 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -1,7 +1,7 @@ module Homebrew module Diagnostic class Checks - def all_development_tools_checks + def development_tools_checks %w[ check_for_unsupported_osx check_for_prerelease_xcode @@ -12,6 +12,18 @@ module Homebrew ] end + def fatal_development_tools_checks + if MacOS.prerelease? + %w[ + check_xcode_up_to_date + check_clt_up_to_date + ] + else + %w[ + ] + end + end + def check_for_unsupported_osx return if ARGV.homebrew_developer? @@ -51,10 +63,17 @@ module Homebrew def check_xcode_up_to_date return unless MacOS::Xcode.installed? && MacOS::Xcode.outdated? + if OS::Mac.prerelease? + xcode_select_nudge = <<-EOS.undent + If #{MacOS::Xcode.latest_version} is installed, you may need to: + sudo xcode-select --switch /path/to/Xcode-beta.app + EOS + end + <<-EOS.undent Your Xcode (#{MacOS::Xcode.version}) is outdated Please update to Xcode #{MacOS::Xcode.latest_version}. - #{MacOS::Xcode.update_instructions} + #{MacOS::Xcode.update_instructions}#{xcode_select_nudge} EOS end |
