KEMBAR78
cask/cask_loader: fix future disable reason by bevanjkay · Pull Request #20765 · Homebrew/brew · GitHub
Skip to content

Conversation

bevanjkay
Copy link
Member

@bevanjkay bevanjkay commented Sep 26, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

When a cask is loaded via the API, if only a disable! stanza was provided with a date in the future, the "reason" was not being displayed correctly. This is because DeprecateDisable sees it as a "deprecation reason" until the disable date is reached. This PR should correctly re-assemble the cask to be read from the API.

Discovered in: https://github.com/orgs/Homebrew/discussions/6433#discussioncomment-14522001

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! A few suggested refactorings, all optional and up to you. Fine to merge as-is if desired. May want to rejig deprecate! block above similarly based on whatever is done.

@bevanjkay bevanjkay force-pushed the future-disable-reason branch from c2f8eea to 19b254f Compare September 26, 2025 13:29
@bevanjkay bevanjkay force-pushed the future-disable-reason branch from 19b254f to 3db7535 Compare September 26, 2025 13:30
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Sep 27, 2025
Merged via the queue into main with commit d12ffc3 Sep 27, 2025
38 checks passed
@MikeMcQuaid MikeMcQuaid deleted the future-disable-reason branch September 27, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants