Improve updates of auto_updates casks#21962
Merged
MikeMcQuaid merged 1 commit intomainfrom Apr 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts Homebrew Cask upgrade behavior around auto_updates true casks by adding an opt-out environment variable, surfacing relevant environment “hints” during upgrades, and attempting to avoid hard failures when installed cask metadata can’t be loaded.
Changes:
- Add
HOMEBREW_NO_UPGRADE_AUTO_UPDATES_CASKSEnvConfig entry and Sorbet RBI for disabling auto-updates bundle staleness upgrades. - Update
cask upgrademessaging to print environment/flag hints (withHOMEBREW_NO_ENV_HINTSsuppression). - Change upgrade flow to skip (with guidance) casks whose installed caskfile can’t be loaded, instead of aborting the entire upgrade.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi | Adds Sorbet signatures for new env config accessors (but currently includes an extra accessor without runtime backing). |
| Library/Homebrew/env_config.rb | Registers HOMEBREW_NO_UPGRADE_AUTO_UPDATES_CASKS in EnvConfig. |
| Library/Homebrew/cask/upgrade.rb | Prints new env hints and changes handling of invalid/unloadable installed cask metadata during upgrade. |
| Library/Homebrew/cask/cask.rb | Uses the new env var to short-circuit auto_updates_bundle_outdated?. |
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/env_config.rbi: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add `HOMEBREW_NO_UPGRADE_AUTO_UPDATES_CASKS` enviroment variable to disable this behaviour entirely - Output this (and other relevant variables and flags) as environment hints with the usual option to disable their output - Detect and provide workaround instructions for casks with broken metadata directories during the upgrade process rather than blowing it up
709a980 to
1ee8869
Compare
bevanjkay
approved these changes
Apr 9, 2026
Member
Author
|
@yudgnahk Please slow down. You've opened 2 PRs and posted 3 nearly identical comments. Will review a follow-up PR to add 2 non-integration tests, thanks, as long as you've reviewed your AI output first. |
|
Sorry @MikeMcQuaid, it's a mistake. |
3 tasks
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.
HOMEBREW_NO_UPGRADE_AUTO_UPDATES_CASKSenviroment variable to disable this behaviour entirelyImproves changed behaviour from #21882
Closes #21961
Fixes #21951
Fixes #21958
brew lgtm(style, typechecking and tests) with your changes locally?Hand coded.