Skip to content

Send bundle check failures to stderr#23009

Merged
MikeMcQuaid merged 1 commit into
mainfrom
bundle-check-stderr
Jul 8, 2026
Merged

Send bundle check failures to stderr#23009
MikeMcQuaid merged 1 commit into
mainfrom
bundle-check-stderr

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Keeps brew bundle env --check output usable for shell capture.
  • Treats unmet dependency reports as diagnostics instead of data.
  • Covers the failure stream contract in check_subcommand_spec.

  • 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.

OpenAI Codex 5.5 xhigh with local review and testing.


Copilot AI review requested due to automatic review settings July 8, 2026 07:42

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

Routes brew bundle check failure diagnostics to stderr so stdout remains suitable for scripting/capture (e.g., brew bundle env --check), and updates the spec suite to enforce the new stream expectations.

Changes:

  • Send unmet-dependency and guidance messages from brew bundle check to stderr instead of stdout.
  • Update check_subcommand_spec expectations from to_stdout to to_stderr, including a contract check for stdout behavior in at least one failure case.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Library/Homebrew/bundle/subcommand/check.rb Writes dependency-failure messaging to stderr and preserves stdout for success output.
Library/Homebrew/test/cmd/bundle/check_subcommand_spec.rb Adjusts specs to assert failure output is emitted on stderr (and refines output stream contract coverage).

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

Comment thread Library/Homebrew/test/cmd/bundle/check_subcommand_spec.rb Outdated
- Keeps `brew bundle env --check` output usable for shell capture.
- Treats unmet dependency reports as diagnostics instead of data.
- Covers the failure stream contract in `check_subcommand_spec`.
@MikeMcQuaid MikeMcQuaid force-pushed the bundle-check-stderr branch from 5015ec1 to ffa6c7a Compare July 8, 2026 13:17
@MikeMcQuaid MikeMcQuaid enabled auto-merge July 8, 2026 13:39
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit c777e8e Jul 8, 2026
41 checks passed
@MikeMcQuaid MikeMcQuaid deleted the bundle-check-stderr branch July 8, 2026 14:31
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.

3 participants