Repository navigation
fix(cli): Make the Homebrew binary executable before generating completions - #2077
Merged
Merged
Conversation
…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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 7, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2048.
brew upgrade sentryto 0.48.0 fails withexec failed (EACCES)ingenerate_completions_from_executable, and the upgrade rolls back.The binary isn't executable when
installruns. The release assets are bare.gzfiles, and gzip stores no file mode. Homebrew'sGzipunpack strategy copies the downloaded file and runsgunzip, sosentrycomes out as0644. Homebrew'sCleanersets the exec bit on Mach-O and ELF files, but only afterinstallfinishes. Before #1555 the formula first ran the binary inpost_install, which runs after the cleaner, so nobody hit this.The fix adds
chmod 0755, bin/"sentry"right afterbin.installin the.craft.ymlformula template.Verification
I ran a real
brew installon Linux x86_64, using a Homebrew checkout and a local tap:brew: exec failed (EACCES): .../Cellar/sentry/0.48.0/bin/sentry…sentry cli completion bash exited with 1.chmodline: installs.bin/sentryends up-r-xr-xr-x, bash, zsh, and fish completions are written to the keg, andbrew testpasses.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 upgradeto 0.48.0 keeps failing unless that formula is patched by hand too.via @BYK.
--
View Session in Sentry