Skip to content

bundle add: accept fully-qualified names from untapped taps - #23266

Merged
MikeMcQuaid merged 1 commit into
mainfrom
bundle-add-fully-qualified-taps
Jul 22, 2026
Merged

bundle add: accept fully-qualified names from untapped taps#23266
MikeMcQuaid merged 1 commit into
mainfrom
bundle-add-fully-qualified-taps

Conversation

@p-linnane

@p-linnane p-linnane commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

brew bundle add rejected fully-qualified formula and cask names from untapped taps, failing before it wrote anything to the Brewfile (reported in #23265). brew install and brew bundle install both treat a fully-qualified name as explicit consent to install its tap, but brew bundle add kept neither carve-out after the "Stop implicit tap installation" change, so the same name accepted by brew install was refused by the command whose whole job is writing that entry.

This mirrors brew install: for a fully-qualified formula or cask argument it installs the tap and applies formula- or cask-specific trust before loading the item for its description and validation. Unqualified names still never cause an implicit tap install, and tap and extension entries keep their existing behavior.

Fixes #23265


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • AI was used to generate or assist with generating this PR.

Claude Code (Opus 4.8) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the fix and pass with it, and ran brew lgtm + targeted specs.


Signed-off-by: Patrick Linnane <patrick@linnane.io>

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.

Pull request overview

This pull request updates brew bundle add to accept fully-qualified formula and cask names from taps that are not currently installed, aligning its behaviour with brew install and avoiding early failures when the user is explicitly naming a tap-owned item.

Changes:

  • Ensure the tap for a fully-qualified formula/cask argument is installed before attempting to load it.
  • Apply item-level trust for fully-qualified formulae/casks (where applicable) before loading, to satisfy the trust model.
  • Add specs covering the fully-qualified formula and cask cases from an untapped tap, including operation ordering.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/bundle/adder.rb Installs the tap (for fully-qualified items) and applies item trust before loading formulae/casks for validation/description.
Library/Homebrew/test/cmd/bundle/add_subcommand_spec.rb Adds tests ensuring tap install and trust occur before loading fully-qualified formulae/casks from untapped taps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense, thanks!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 22, 2026
@MikeMcQuaid
MikeMcQuaid removed this pull request from the merge queue due to a manual request Jul 22, 2026
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit ba7da79 Jul 22, 2026
43 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the bundle-add-fully-qualified-taps branch July 22, 2026 07:35
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.

brew bundle add fails for fully-qualified names from untapped taps — no explicit-tap carve-out like install / bundle install

3 participants