Repository navigation
fix(brew.bundle): pass --force-cleanup instead of disabled --cleanup - #133
Merged
Merged
Conversation
Homebrew 5.1.15 (e0d818bbbd, 2026-05-29) made `brew bundle install --cleanup` ask before removal, then disabled the switch outright. On Homebrew 7.0.9 it fails with "Calling the `--cleanup` switch is disabled! There is no replacement.", so every brew.bundle action with cleanup: true errored. `--force-cleanup` performs the cleanup without asking, which is the behaviour the action documents. The old test used a substring match, which `--force-cleanup` also satisfies; it now checks argument tokens, and a new test pins that cleanup: false emits no cleanup flag. Reported by the ai-config session's claim-check sweep. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aux8gVLuPWbaZnmeza37Mu
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
brew.bundlewithcleanup: truepassedbrew bundle install --cleanup. Homebrew 5.1.15 (e0d818bbbd, 2026-05-29) disabled that switch, and on Homebrew 7.0.9 it fails with "Calling the--cleanupswitch is disabled! There is no replacement." Everycleanup: trueaction errored.--force-cleanup. In Homebrew'sbundle/subcommand/install.rb, that switch runs the cleanup withforce: true, which is the remove-without-asking behaviour the action documents.Changes
lib/src/actions/brew/bundle.rs: swap the flag and add a comment explaining why.--force-cleanupalso satisfies, so it now checks argument tokens. A new test pins thatcleanup: falseemits no cleanup flag.examples/brew/brew-management.yaml: note thatcleanup: trueneeds Homebrew 5.1.15 or later.Test Plan
plan_includes_cleanup_flagfailed withexpected '--force-cleanup' in: ... brew bundle install --file=/tmp/Brewfile --cleanup.make test: 1137 Rust tests passed, 64 Python tests passed.claudeand on the Mac Studio (both Homebrew 7.0.9),brew bundle install --force-cleanup --helpexits 0, and the--cleanupform prints the "disabled" error.Risk
Low. Homebrew older than 5.1.15 does not have
--force-cleanup; the fleet is on 7.0.9.Spec alignment
SKIP: no plan or spec. This is a one-line bug fix.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Aux8gVLuPWbaZnmeza37Mu