Skip to content

Homebrew cask template uses deprecated postflight, warns on every brew invocation #540

Description

@ubuntudroid

build/brew/cq.rb.tpl:27 uses a postflight do block, which Homebrew has deprecated. On Homebrew 7.0.4, every brew outdated / brew upgrade run that touches the tap prints:

Warning: Calling `postflight` is deprecated! Use `postflight_steps` instead.
Please report this issue to the mozilla-ai/homebrew-tap tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/mozilla-ai/homebrew-tap/Casks/cq.rb:36

Because the cask is generated ("Auto-generated on release"), fixing the generated file in the tap would be overwritten on the next release — the template is the fix site.

The block only strips the quarantine attribute:

postflight do
  if OS.mac?
    system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/cq"]
  end
end

Two options:

  1. Rename to postflight_steps, as the warning suggests.
  2. Drop the block entirely in favour of the cask-level quarantine false stanza, if the intent is simply that the binary not be quarantined. This changes semantics — it prevents quarantining rather than removing the attribute afterwards — so it is your call which matches the intent.

Deprecations become errors in a later Homebrew release, at which point brew install cq / brew upgrade cq breaks rather than warns.

Environment: Homebrew 7.0.4, macOS 25.6.0 arm64, cq cask v0.17.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions