Repository navigation
fix(cli): detect Homebrew cask installs on Intel macOS - #176
Merged
Merged
Conversation
The `update` command's install-method detection only matched `Cellar` (formula installs), the Apple Silicon brew prefix (`opt/homebrew`), and linuxbrew. Intel-Mac cask installs land in `/usr/local/Caskroom/...`, which none of those markers cover, so detection fell through to `unknown` and forced users into the manual recovery path. Apple Silicon cask installs (`/opt/homebrew/Caskroom/...`) worked only by coincidence — the `opt/homebrew` marker happened to match. Add an explicit `Caskroom` marker so both arches detect cleanly, and extend the parameterized detection test with cask layouts on Intel and Apple Silicon. Closes #175.
blimmer
marked this pull request as ready for review
May 19, 2026 19:41
blimmer
enabled auto-merge (squash)
May 19, 2026 19:48
blimmer
pushed a commit
that referenced
this pull request
May 19, 2026
🤖 I have created a release *beep* *boop* --- ## [0.7.2](v0.7.1...v0.7.2) (2026-05-19) ### Bug Fixes * **annotation:** confirm before discarding draft comments ([#174](#174)) ([becad44](becad44)) * **cli:** detect Homebrew cask installs on Intel macOS ([#176](#176)) ([1edd638](1edd638)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: contextbridge-pr-automation[bot] <259134118+contextbridge-pr-automation[bot]@users.noreply.github.com>
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.
Summary
contextbridge updatecouldn't detect that the binary was a Homebrew cask install when run on an Intel Mac, because the marker list atpackages/cli/src/updater/UpdaterImpl.ts:22only covered formula paths (Cellar), the Apple Silicon brew prefix (opt/homebrew), and linuxbrew. Intel cask installs live under/usr/local/Caskroom/..., which matched none of those — detection returnedunknownand forced users through the manual recovery commands. Apple Silicon cask installs (/opt/homebrew/Caskroom/...) worked only by coincidence via theopt/homebrewmarker. Closes #175.Review focus
Adding an explicit
Caskroommarker is the obvious fix, but worth a sanity check: any other layout the team ships into that shouldn't get auto-brew upgrade'd? The only other Homebrew artifact directory I can think of isopt/<formula>for keg-only formulae — those go through Cellar too, so they're already covered. Not aware of any path where matchingCaskroomwould be wrong.Commits
0d198da— fix(cli): detect Homebrew cask installs on Intel macOS