Skip to content

Use install_steps for the Homebrew cask quarantine hook - #573

Open
akhilgopu72 wants to merge 1 commit into
DopplerHQ:masterfrom
akhilgopu72:fix/cask-postflight-steps
Open

akhilgopu72 wants to merge 1 commit into
DopplerHQ:masterfrom
akhilgopu72:fix/cask-postflight-steps

Conversation

@akhilgopu72

Copy link
Copy Markdown

Fixes #559.

Homebrew 6+ prints this on every command that loads the Doppler cask:

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

Change

Casks/doppler.rb is generated from homebrew_casks.hooks.post.install, so the fix belongs here rather than in the tap (DopplerHQ/homebrew-doppler#4 would be overwritten on the next release). GoReleaser v2.19.0 added hooks.*.install_steps (goreleaser/goreleaser#6873), which writes Homebrew's declarative postflight_steps stanza. This moves the quarantine strip to it, using the snippet from GoReleaser's own homebrew_casks docs:

install_steps: |
  on_macos do
    run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/doppler"]
  end

{{ .StagedPath }} renders to Homebrew's {{staged_path}} token, which is expanded at install time.

Requirements

  • GoReleaser >= v2.19.0. release.yaml installs the latest GoReleaser from the apt repo, which is currently v2.19.x. Older versions would reject the unknown install_steps key.

Testing

  • Hand-applied the stanza this config generates to the installed tap cask (Homebrew 7.0.12, macOS arm64): the deprecation warning is gone.
  • Set com.apple.quarantine on the binary, ran brew reinstall --cask dopplerhq/cli/doppler: the attribute was removed and doppler --version runs.
  • Did not run goreleaser release itself; checked the rendered output against the v2.19.0 cask template (flightString emits postflight_steps do ... end when install_steps is set).

🤖 Generated with Claude Code

@akhilgopu72
akhilgopu72 requested a review from a team as a code owner November 4, 2026 01:29
Homebrew deprecated the Ruby postflight block, so every brew command that
loads the generated cask warns. GoReleaser v2.19 emits postflight_steps
from hooks.post.install_steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@akhilgopu72
akhilgopu72 force-pushed the fix/cask-postflight-steps branch from 1c140bb to d21011c Compare November 4, 2026 01:36

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] On new Homebrew 6 calling postflight is deprecated

1 participant