Skip to content

fix(homebrew): wrap macOS version dependency in on_macos block#1264

Merged
fkorotkov-oai merged 1 commit into
openai:mainfrom
wincent:fix-macos-depends-on-deprecation
Jun 15, 2026
Merged

fix(homebrew): wrap macOS version dependency in on_macos block#1264
fkorotkov-oai merged 1 commit into
openai:mainfrom
wincent:fix-macos-depends-on-deprecation

Conversation

@wincent

@wincent wincent commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

GoReleaser's Homebrew template always emits a bare depends_on :macos for macOS-only formulae. Combining that with the depends_on :macos => :ventura line injected via custom_block triggers a Homebrew deprecation warning on brew upgrade:

  Warning: Calling `depends_on :macos` with `depends_on macos:` is deprecated! Use `depends_on :macos` with `depends_on macos:` inside an `on_macos` block instead.
  Please report this issue to the cirruslabs/homebrew-cli tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
    /opt/homebrew/Library/Taps/cirruslabs/homebrew-cli/tart.rb:22

Declaring the version constraint inside an on_macos block is the form Homebrew recommends and silences the warning without changing behavior (still macOS-only, Ventura or newer).

Upstream issue:

Related PR for softnet formula, which I also use:

GoReleaser's Homebrew template always emits a bare `depends_on :macos`
for macOS-only formulae. Combining that with the `depends_on :macos =>
:ventura` line injected via custom_block triggers a Homebrew deprecation
warning on `brew upgrade`:

  Warning: Calling `depends_on :macos` with `depends_on macos:` is deprecated! Use `depends_on :macos` with `depends_on macos:` inside an `on_macos` block instead.
  Please report this issue to the cirruslabs/homebrew-cli tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
    /opt/homebrew/Library/Taps/cirruslabs/homebrew-cli/tart.rb:22

Declaring the version constraint inside an `on_macos` block is the form
Homebrew recommends and silences the warning without changing behavior
(still macOS-only, Ventura or newer).
@fkorotkov-oai

Copy link
Copy Markdown
Collaborator

Thank you!

@fkorotkov-oai fkorotkov-oai merged commit 32d084e into openai:main Jun 15, 2026
@wincent wincent deleted the fix-macos-depends-on-deprecation branch June 16, 2026 05:39
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.

2 participants