Merge pull request #18274 from Homebrew/improve_brew_doctor_prerelease

Improve `brew doctor` output on prerelease macOS
This commit is contained in:
Mike McQuaid 2024-09-06 17:51:16 +01:00 committed by GitHub
commit 9978c3d11a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -130,6 +130,9 @@ module Homebrew
def check_xcode_up_to_date
return unless MacOS::Xcode.outdated?
# avoid duplicate very similar messages
return if MacOS::Xcode.below_minimum_version?
# CI images are going to end up outdated so don't complain when
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers
@ -161,6 +164,9 @@ module Homebrew
def check_clt_up_to_date
return unless MacOS::CLT.outdated?
# avoid duplicate very similar messages
return if MacOS::CLT.below_minimum_version?
# CI images are going to end up outdated so don't complain when
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers

View File

@ -315,6 +315,11 @@ module OS
Install the Command Line Tools for Xcode 11.3.1 from:
#{Formatter.url(MacOS::Xcode::APPLE_DEVELOPER_DOWNLOAD_URL)}
EOS
elsif OS::Mac.version.prerelease?
<<~EOS
Install the Command Line Tools for Xcode #{minimum_version.split(".").first} from:
#{Formatter.url(MacOS::Xcode::APPLE_DEVELOPER_DOWNLOAD_URL)}
EOS
else
<<~EOS
Install the Command Line Tools:
@ -325,6 +330,8 @@ module OS
sig { returns(String) }
def self.update_instructions
return installation_instructions if OS::Mac.version.prerelease?
software_update_location = if MacOS.version >= "13"
"System Settings"
elsif MacOS.version >= "10.14"