Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve brew doctor output on prerelease macOS #18274

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def check_for_unsupported_macos
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
Expand Down Expand Up @@ -161,6 +164,9 @@ def check_xcode_up_to_date
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
Expand Down
7 changes: 7 additions & 0 deletions Library/Homebrew/os/mac/xcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ def self.installation_instructions
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:
Expand All @@ -325,6 +330,8 @@ def self.installation_instructions

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"
Expand Down