Skip to content

Untap unmanaged Homebrew taps before brew doctor in setup flow - #277

Merged
PartTimeLegend merged 13 commits into
masterfrom
copilot/remove-unnecessary-core-tap
Sep 10, 2026
Merged

Untap unmanaged Homebrew taps before brew doctor in setup flow#277
PartTimeLegend merged 13 commits into
masterfrom
copilot/remove-unnecessary-core-tap

Conversation

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Homebrew health checks were noisy/failing due to unnecessary local taps (notably homebrew/core) being present during validation. This change adds deterministic tap hygiene before brew doctor so only explicitly declared taps are retained.

  • Tap hygiene before post-checks

    • Added cleanup_unmanaged_homebrew_taps() and invoked it in run_post_checks() prior to brew doctor.
    • Enumerates installed taps and untaps any not declared via tap "..." entries in Brewfile.
  • Brewfile resolution robustness

    • Resolves Brewfile from CWD first, then falls back to script directory, so cleanup runs correctly when invoked outside repo root.
  • Failure visibility

    • If brew untap fails (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

Copilot AI and others added 4 commits September 4, 2026 10:08
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>
@mergify

mergify Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 in Brewfile.
  • Updated Brewfile resolution logic to use CWD first, then fall back to the script directory.
  • Invoked tap cleanup in run_post_checks() immediately before brew 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.

Comment thread NewMachineSetup.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI and others added 4 commits September 10, 2026 09:04
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>
Copilot AI and others added 4 commits September 10, 2026 09:22
…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>
@PartTimeLegend
PartTimeLegend merged commit d496232 into master Sep 10, 2026
19 of 20 checks passed
@PartTimeLegend
PartTimeLegend deleted the copilot/remove-unnecessary-core-tap branch September 10, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants