From ea304ef50ca7588ef6527e5fc1bbfc3e6c50f0fc Mon Sep 17 00:00:00 2001 From: Duc-Tam Nguyen Date: Tue, 7 Jul 2026 08:37:09 +0700 Subject: [PATCH] Dequarantine the brew cask binary on install Homebrew quarantines cask artifacts and Gatekeeper SIGKILLs quarantined binaries that are only ad-hoc signed, which cross-compiled Go binaries are. shirabe hit this first: brew install worked but the binary died with exit 137 until the attribute was stripped by hand. Add the same postflight xattr hook here so casks from the next release run first try. --- .goreleaser.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0b0689c..a4b49ce 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -159,6 +159,15 @@ homebrew_casks: commit_author: name: Duc-Tam Nguyen email: tamnd87@gmail.com + # Homebrew quarantines cask artifacts, and Gatekeeper kills quarantined + # binaries that are only ad-hoc signed (which cross-compiled Go binaries + # are). Strip the attribute at install so the binary runs first try. + hooks: + post: + install: | + if system_command("/usr/bin/xattr", args: ["-h"]).exit_status.zero? + system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/kage"] + end scoops: # Scoop manifest for Windows, pushed to the bucket repository. It installs the