Repository navigation
Keep going when brew bundle fails, and run setup.sh in CI - #6
Merged
Merged
Conversation
A failed cask used to stop setup.sh under set -e, skipping the shell, Ghostty, herdr, git and Docker steps that don't depend on it. Now the script carries on, lists the missing Brewfile entries at the end and exits non-zero. The Brewfile sets cask_args adopt: true, so apps installed by hand (like Chrome) are taken over instead of failing with "It seems there is already an App". CI gains a macOS job that runs setup.sh twice, checks the second run changes nothing and that an interactive zsh starts without errors. The Brewfile check now also fails on deprecated or disabled packages, which brew info accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zsh can't turn its line editor on without a terminal, so `zsh -i -c exit` in CI printed "can't change option: zle" no matter what the config does. Run it under a pty via script(1), and strip escape sequences so the prompt itself doesn't count as output. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Under script(1) the pty echoes the EOF character when stdin closes, so the check saw "^D^H^H" and failed. Strip control characters after the escape sequences, leaving only text a human would read as a message. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The EOF that ends the script(1) session is echoed as printable caret notation
("^D"), not as the control character, so stripping control characters left it
behind. Drop lines made up of nothing but caret notation.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous filter used a GNU-only character range, so BSD sed on the macOS
runner rejected it ("RE error: invalid character range") and the step failed on
its own regex rather than on anything zsh printed. Do the whole job in perl,
which behaves the same on both platforms: strip escape sequences, control
characters and the pty's caret-notation echo, and treat whatever is left as a
real message. Non-ASCII text in a message survives.
Co-Authored-By: Claude Opus 5 (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.
A failed cask used to stop
setup.shunderset -e, so the shell, Ghostty, herdr, git and Docker steps were skipped even though none of them need Homebrew to have succeeded. The usual trigger is an app that's already installed by hand ("It seems there is already an App at /Applications/Google Chrome.app"), which is common on any Mac that isn't brand new.setup.shcarries on whenbrew bundlefails, then lists the Brewfile entries that are still missing (brew bundle check --verbose) and exits non-zero.cask_args adopt: true, so apps installed by hand are handed over to Homebrew instead of failing.macos-latest: runs./setup.sh, snapshots the installed packages and the config files it touches, runs it a second time anddiffs the snapshots, so any step that isn't idempotent fails the build. It then checks that an interactive zsh starts without printing anything.brew info --json=v2and fails ondeprecatedordisabledpackages. Plainbrew infosucceeds for those, so a cask on its way out went unnoticed.The new macOS job is the first time CI runs the script end to end, so it's also the proof the fix works: GitHub's runners ship with Chrome installed and hit the original bug straight away.
🤖 Generated with Claude Code