Skip to content

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

Open
wincent wants to merge 1 commit into
openai:mainfrom
wincent:fix-macos-depends-on-deprecation
Open

fix(homebrew): wrap macOS version dependency in on_macos block#169
wincent wants to merge 1 commit into
openai:mainfrom
wincent:fix-macos-depends-on-deprecation

Conversation

@wincent

@wincent wincent commented Jun 10, 2026

Copy link
Copy Markdown

GoReleaser's Homebrew template always emits a bare depends_on :macos for macOS-only formulae. Combining that with the depends_on :macos => :sequoia 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/softnet.rb:18

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

Upstream issue:

Related PR for tart 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 =>
:sequoia` 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/softnet.rb:18

Declaring the version constraint inside an `on_macos` block is the form
Homebrew recommends and silences the warning without changing behavior
(still macOS-only, Sequoia or newer).
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.

1 participant