From 1408b5ffd4dfbac840580ea9946237d8164941d8 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Tue, 30 Aug 2016 03:54:24 +0100 Subject: diagnostic: add strict_development_tools_checks --- Library/Homebrew/extend/os/mac/diagnostic.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 120e5d15c..11d497d60 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -12,6 +12,13 @@ module Homebrew ] end + def strict_development_tools_checks + %w[ + check_xcode_up_to_date + check_clt_up_to_date + ] + end + def check_for_unsupported_osx return if ARGV.homebrew_developer? @@ -51,10 +58,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 -- cgit v1.2.3 From f1cc1265afa43afb9bffba17c9fc18776b62dd99 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 7 Sep 2016 09:11:06 +0100 Subject: Refactor MacOS check_development_tools usage. Better use the abstraction layer so e.g. Linux could have similarly fatal checks for these things. --- Library/Homebrew/extend/os/mac/diagnostic.rb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 11d497d60..27ef71d75 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,11 +12,16 @@ module Homebrew ] end - def strict_development_tools_checks - %w[ - check_xcode_up_to_date - check_clt_up_to_date - ] + 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 -- cgit v1.2.3