Show install status in which-formula#22300
Open
MikeMcQuaid wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates brew which-formula to display whether matching provider formulae are installed, and refactors shared Bash helpers so multiple commands can reuse common API/executables-db logic and consistent output formatting.
Changes:
- Add install-status rendering to
which-formulaoutput (with emoji or text labels depending onHOMEBREW_NO_EMOJI). - Extract shared Bash helpers into
utils.sh(output/formatting) plusutils/api.shandutils/executables.sh(executables.txt download + parsing). - Update
brew updateandbrew execto reuse the shared executables database logic and announce executables.txt downloads.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/utils/wrapper.sh | Switches helper sourcing from removed utils/helpers.sh to new utils.sh. |
| Library/Homebrew/utils/tty.sh | Adds Bash TTY/color detection + columns() helper. |
| Library/Homebrew/utils/tty.rb | Adds cross-reference comment for Bash columns(). |
| Library/Homebrew/utils/ruby.sh | Updates sourcing to utils.sh for brew/odie helpers. |
| Library/Homebrew/utils/output.rb | Adds “keep in sync” comments for Bash output/formatting parity. |
| Library/Homebrew/utils/helpers.sh | Removes legacy Bash helper file (superseded by utils.sh + subhelpers). |
| Library/Homebrew/utils/formatter.sh | Adds Bash formatting helpers (headline, bold, label coloring). |
| Library/Homebrew/utils/formatter.rb | Adds cross-reference comments for Bash formatter helpers. |
| Library/Homebrew/utils/executables.sh | Centralizes executables.txt caching/downloading and matching logic. |
| Library/Homebrew/utils/api.sh | Introduces shared API URL/curlrc/time-cond helpers for Bash. |
| Library/Homebrew/utils.sh | New consolidated Bash helpers (ohai/opoo/onoe/odie, pretty status, shims). |
| Library/Homebrew/test/cmd/which-formula_spec.rb | Updates integration expectations to include install status + adds download announcement test. |
| Library/Homebrew/test/cmd/update_spec.rb | Refactors test setup for new utils layout and adds executables.txt announcement test. |
| Library/Homebrew/list.sh | Updates to source utils.sh (for columns, ohai, etc.). |
| Library/Homebrew/extend/kernel.rb | Adds cross-reference comment for Bash which(). |
| Library/Homebrew/cmd/which-formula.sh | Uses shared executables helpers and prints install status per formula. |
| Library/Homebrew/cmd/update.sh | Reuses shared API helpers, sources executables helpers, and announces executables.txt fetches. |
| Library/Homebrew/cmd/setup-ruby.sh | Updates to source utils.sh. |
| Library/Homebrew/cmd/exec.sh | Uses shared executables helpers instead of sourcing which-formula script. |
| Library/Homebrew/brew.sh | Switches global helper sourcing from utils/helpers.sh to utils.sh. |
| AGENTS.md | Documents convention for keeping mirrored Bash/Ruby logic in sync with two-way comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Help users identify already-installed providers in command searches - Preserve plain formula output for non-TTY consumers - Share `executables.txt` fetching and parsing across Bash commands - Keep Bash formatting helpers aligned with their Ruby counterparts - Limit added integration coverage to core command behaviour - Avoid creating repo-root `Cellar` in command specs
9c97983 to
28c3a66
Compare
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.
Fixes #22282
While we're here:
executables.txtfetching and parsing across Bash commandsbrew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 xhigh with local review.