fix(setup): make Ghostty install bulletproof#2
Merged
Conversation
The cask install failed on machines that already had a manually installed /Applications/Ghostty.app: `brew install --cask ghostty` errors with "already an App at ...", so validation reported Ghostty MISSING even though the app was present. - install_ghostty: skip when brew already manages it; adopt an existing app into Homebrew instead of colliding with it; retry once after `brew update` for flaky networks; force-replace as a last resort. - Verify the outcome after every install attempt instead of trusting the exit code. - validate(): detect Ghostty by brew cask OR app bundle, removing the false-positive MISSING for non-brew installs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Problem
On machines that already had a manually installed
/Applications/Ghostty.app(direct.dmg, corporate image, MDM),brew install --cask ghosttyfails withError: It seems there is already an App at '/Applications/Ghostty.app'. The script warned and continued, andvalidate()then reported Ghostty (cask) — MISSING even though Ghostty was present — producing the alarming "1 problem(s)" output a colleague hit.Fix
install_ghostty— sanity-checked, layered install:Ghostty.appinto Homebrew (--adopt) instead of colliding with it;brew updatefor flaky networks;--forcereplace as a last resort (only when an app is actually present).brew list --cask ghostty) instead of trusting the exit code.validate()now detects Ghostty by brew cask or app bundle, removing the false-positive MISSING for non-brew installs.Validation
bash -nclean;shellcheckclean for the new code.--checkpasses via the newghostty_presentpredicate.🤖 Generated with Claude Code