Untap unmanaged Homebrew taps before brew doctor in setup flow - #277
Merged
Conversation
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
PartTimeLegend
September 4, 2026 10:17
View session
PartTimeLegend
marked this pull request as ready for review
September 4, 2026 10:23
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Current empty-Brewfile behavior can untap essential homebrew/* taps (e.g., homebrew/bundle), which may have unintended post-setup side effects.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds a Homebrew tap “hygiene” step to the Bash setup flow so brew doctor runs with a deterministic (and less noisy) set of taps, based on what’s declared in the repository Brewfile.
Changes:
- Added
cleanup_unmanaged_homebrew_taps()to enumerate current taps and untap anything not declared inBrewfile. - Updated Brewfile resolution logic to use CWD first, then fall back to the script directory.
- Invoked tap cleanup in
run_post_checks()immediately beforebrew doctor, treating untap failures as warnings.
File summaries
| File | Description |
|---|---|
| NewMachineSetup.sh | Adds tap-cleanup helper and runs it before brew doctor during post-checks. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
…s is empty Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
…p loop Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.com>
… spec Co-authored-by: PartTimeLegend <791578+PartTimeLegend@users.noreply.github.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.
Homebrew health checks were noisy/failing due to unnecessary local taps (notably
homebrew/core) being present during validation. This change adds deterministic tap hygiene beforebrew doctorso only explicitly declared taps are retained.Tap hygiene before post-checks
cleanup_unmanaged_homebrew_taps()and invoked it inrun_post_checks()prior tobrew doctor.tap "..."entries inBrewfile.Brewfile resolution robustness
Failure visibility
brew untapfails (e.g., still referenced by installed formulae), the script emits a warning to stderr instead of failing the run.cleanup_unmanaged_homebrew_taps invoke_with_retry "Run brew doctor" brew doctor