Skip to content

fix(cli): Make the Homebrew binary executable before generating completions - #2077

Merged
BYK merged 1 commit into
mainfrom
fix/brew-formula-exec-bit
Nov 7, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/brew-formula-exec-bit

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #2048.

brew upgrade sentry to 0.48.0 fails with exec failed (EACCES) in generate_completions_from_executable, and the upgrade rolls back.

The binary isn't executable when install runs. The release assets are bare .gz files, and gzip stores no file mode. Homebrew's Gzip unpack strategy copies the downloaded file and runs gunzip, so sentry comes out as 0644. Homebrew's Cleaner sets the exec bit on Mach-O and ELF files, but only after install finishes. Before #1555 the formula first ran the binary in post_install, which runs after the cleaner, so nobody hit this.

The fix adds chmod 0755, bin/"sentry" right after bin.install in the .craft.yml formula template.

Verification

I ran a real brew install on Linux x86_64, using a Homebrew checkout and a local tap:

  • 0.48.0 formula as published: fails with the same error as the issue: brew: exec failed (EACCES): .../Cellar/sentry/0.48.0/bin/sentry … sentry cli completion bash exited with 1.
  • Same formula with the chmod line: installs. bin/sentry ends up -r-xr-xr-x, bash, zsh, and fish completions are written to the keg, and brew test passes.

I didn't test on macOS. The cause and the code paths are the same on both platforms: the macOS cleaner checks for Mach-O and the Linux cleaner checks for ELF.

Note

Users only get this fix when the next CLI release regenerates getsentry/homebrew-tools/Formula/sentry.rb. Until then, brew upgrade to 0.48.0 keeps failing unless that formula is patched by hand too.

via @BYK.

--

View Session in Sentry

…etions

The release assets are bare gzip files, so Homebrew unpacks `sentry` with
mode 0644. Homebrew's cleaner sets the exec bit only after `install`, so
`generate_completions_from_executable` failed with EACCES and rolled back
the upgrade to 0.48.0.

Fixes #2048

Co-Authored-By: BYK <[email protected]>
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 7, 2026 2:05am UTC

Request Review

@BYK
BYK enabled auto-merge (squash) November 7, 2026 02:06
@BYK
BYK merged commit 21e48f4 into main Nov 7, 2026
37 checks passed
@BYK
BYK deleted the fix/brew-formula-exec-bit branch November 7, 2026 02:17

This branch was successfully deployed

1 active deployment
Preview — c74b9d63 Deployed Nov 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Homebrew upgrade to 0.48.0 fails: exec failed (EACCES) in generate_completions_from_executable (from #1555)

1 participant