Skip to content

fix(release): Homebrew cask clears the quarantine flag - #114

Merged
andreacappelletti97 merged 1 commit into
mainfrom
fix/cask-quarantine
Oct 16, 2026
Merged

andreacappelletti97 merged 1 commit into
mainfrom
fix/cask-quarantine

Conversation

@andreacappelletti97

Copy link
Copy Markdown
Contributor

Bug: brew install c3xdev/tap/c3x installed a c3x that macOS killed on launch (exit 137). Homebrew quarantines what a cask downloads, and Gatekeeper rejects a quarantined binary that isn't notarized. Ours is ad-hoc signed only (spctl: rejected). The same binary runs once the flag is removed.

Fix:

  • A custom_block generates postflight_steps that runs xattr -dr com.apple.quarantine c3x on macOS.
  • hooks would emit postflight do, which Homebrew 7 deprecates in favour of postflight_steps.
  • The description and homepage are adjusted for brew style.

Tested on macOS arm64 with Homebrew 7.0.9:

  • goreleaser check passes, and a snapshot release generates the block.
  • The generated cask installs; the quarantine flag is gone; c3x --version and c3x doctor run; brew audit --cask --strict --online passes.
  • GoReleaser places custom_block first, so brew style reports stanza order. That's cosmetic: audit and install pass.

c3xdev/homebrew-tap@60ac887 already fixes the published 0.3.20 cask (cleanly ordered, brew style clean). I verified it with a fresh brew install from GitHub.

Longer term, signing and notarizing the macOS binaries with an Apple Developer ID would remove the need for this.

Homebrew quarantines what a cask downloads and Gatekeeper kills a
quarantined binary that is not notarized, so the cask's c3x exited 137 on
launch. Generate a postflight_steps block that removes the flag (hooks
would emit the deprecated postflight), and fix the desc/homepage that
brew style flagged.
@andreacappelletti97
andreacappelletti97 merged commit 1be906b into main Oct 16, 2026
6 checks passed
@andreacappelletti97
andreacappelletti97 deleted the fix/cask-quarantine branch October 16, 2026 19:00
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