fix(homebrew): wrap macOS version dependency in on_macos block#169
Open
wincent wants to merge 1 commit into
Open
fix(homebrew): wrap macOS version dependency in on_macos block#169wincent wants to merge 1 commit into
wincent wants to merge 1 commit into
Conversation
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).
This was referenced Jun 10, 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.
GoReleaser's Homebrew template always emits a bare
depends_on :macosfor macOS-only formulae. Combining that with thedepends_on :macos => :sequoialine injected via custom_block triggers a Homebrew deprecation warning onbrew upgrade:Declaring the version constraint inside an
on_macosblock is the form Homebrew recommends and silences the warning without changing behavior (still macOS-only, Sequoia or newer).Upstream issue:
depends_on :macoscirruslabs/homebrew-cli#14Related PR for
tartformula, which I also use: