Skip to content

fix(cli): detect Homebrew cask installs on Intel macOS - #176

Merged
blimmer merged 2 commits into
mainfrom
fix/updater-detect-intel-cask
May 19, 2026
Merged

blimmer merged 2 commits into
mainfrom
fix/updater-detect-intel-cask

Conversation

@blimmer

@blimmer blimmer commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

contextbridge update couldn't detect that the binary was a Homebrew cask install when run on an Intel Mac, because the marker list at packages/cli/src/updater/UpdaterImpl.ts:22 only 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 returned unknown and forced users through the manual recovery commands. Apple Silicon cask installs (/opt/homebrew/Caskroom/...) worked only by coincidence via the opt/homebrew marker. Closes #175.

Review focus

Adding an explicit Caskroom marker 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 is opt/<formula> for keg-only formulae — those go through Cellar too, so they're already covered. Not aware of any path where matching Caskroom would be wrong.

Commits

  • 0d198da — fix(cli): detect Homebrew cask installs on Intel macOS

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
blimmer marked this pull request as ready for review May 19, 2026 19:41
@blimmer
blimmer requested a review from jcarver989 as a code owner May 19, 2026 19:41
@blimmer
blimmer enabled auto-merge (squash) May 19, 2026 19:48
@blimmer
blimmer merged commit 1edd638 into main May 19, 2026
11 checks passed
@blimmer
blimmer deleted the fix/updater-detect-intel-cask branch May 19, 2026 19:50
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>
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.

bug: update cannot detect Homebrew cask installs on Intel macOS (/usr/local/Caskroom/...)

1 participant