Avoid duplicate upgrade warnings#22805
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses duplicate “already installed / not upgrading” warnings shown by brew upgrade when running in ask-mode (preview dry-run followed by the actual pass), by suppressing the preview-pass warnings for named items that will be evaluated again during the real upgrade.
Changes:
- Suppress “already installed”/minimum-version warning output during the ask-mode preview pass for named formulae.
- Apply the same “preview quiet” behavior to cask upgrading and minimum-version filtering.
- Add a spec ensuring up-to-date named formula upgrades warn only once.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Library/Homebrew/cmd/upgrade.rb |
Introduces a derived quiet for ask-mode preview passes to prevent duplicate warnings for named formulae/casks. |
Library/Homebrew/test/cmd/upgrade_spec.rb |
Adds coverage for the “warn once for already up-to-date named formula” behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2c13d87 to
5edc38a
Compare
carlocab
approved these changes
Jun 19, 2026
- Suppress ask-mode preview warnings for named packages that are checked again during the actual upgrade pass. - Add coverage so up-to-date formula and cask upgrades only warn once.
5edc38a to
30719dd
Compare
carlocab
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22801
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.5 high with local review and testing.