Repository navigation
Conversation
A failed post-install leaves the package installed, but bundle install propagated the error with ? and skipped every remaining entry. Report it, keep going, and fail at the end with the entries whose post-install did not finish. Any other install error still stops the run. Fixes zerobrewhq#478
cachebag
requested changes
Nov 5, 2026
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
zb bundle installran each entry withinstall::execute(...).await?, so aPostInstallFailedfrom one package (php'sconfigure_phpin the issue) ended the whole run even though that package was already installed and linked. Everything after it in the Brewfile got skipped.Fix
In
bundle.rsaPostInstallFailedfrom an entry is now printed and recorded, and the loop moves on. After the last entry, if any post-install failed the command exits non-zero withpost-install did not finish for: <entries>. Any other error (missing formula, network, link conflict, ...) still stops the run like before. I went with stopping on real install failures since that's the current behaviour and the issue said either was fine.I pulled the decision into a small
keep_going_after_post_installhelper so it can be unit tested without a real installer.Testing
cargo test -p zb_cli bundle: two new tests, one for a post-install failure being recorded and not stopping the run, one for other errors still propagatingcargo clippy -p zb_cli --all-targets -- -D warnings,cargo fmt --checkFixes #478
cargo test --workspace,cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --all --checkall pass.