Skip to content

fix(brew.bundle): pass --force-cleanup instead of disabled --cleanup - #133

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/brew-bundle-force-cleanup
Oct 17, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/brew-bundle-force-cleanup

Conversation

@brujack

@brujack brujack commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • brew.bundle with cleanup: true passed brew 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 --cleanup switch is disabled! There is no replacement." Every cleanup: true action errored.
  • The action now passes --force-cleanup. In Homebrew's bundle/subcommand/install.rb, that switch runs the cleanup with force: true, which is the remove-without-asking behaviour the action documents.
  • The ai-config session's claim-check sweep reported it.

Changes

  • lib/src/actions/brew/bundle.rs: swap the flag and add a comment explaining why.
  • Tests: the old cleanup test used a substring match, which --force-cleanup also satisfies, so it now checks argument tokens. A new test pins that cleanup: false emits no cleanup flag.
  • examples/brew/brew-management.yaml: note that cleanup: true needs Homebrew 5.1.15 or later.

Test Plan

  • RED first: plan_includes_cleanup_flag failed with expected '--force-cleanup' in: ... brew bundle install --file=/tmp/Brewfile --cleanup.
  • make test: 1137 Rust tests passed, 64 Python tests passed.
  • On claude and on the Mac Studio (both Homebrew 7.0.9), brew bundle install --force-cleanup --help exits 0, and the --cleanup form prints the "disabled" error.
  • Coverage: floor 81% (Linux CI tarpaulin). Two tests were added and none removed.

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

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
@github-actions
github-actions Bot merged commit d556163 into main Oct 17, 2026
12 checks passed
@brujack
brujack deleted the fix/brew-bundle-force-cleanup branch October 17, 2026 22:57
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.

1 participant