Skip to content

fix(upgrade): ignore benign Homebrew stderr during package upgrades#603

Merged
buresdv merged 1 commit intoburesdv:main.ignorable-updating-messagesfrom
matracey:main
Mar 31, 2026
Merged

fix(upgrade): ignore benign Homebrew stderr during package upgrades#603
buresdv merged 1 commit intoburesdv:main.ignorable-updating-messagesfrom
matracey:main

Conversation

@matracey
Copy link
Copy Markdown
Contributor

Problem

Homebrew writes progress and status messages to stderr by design (not just errors). For example, lines like:

  • ✅ Bottle frei0r (2.5.6)
  • ==> Downloading ...
  • 🍺 /usr/local/Cellar/...

Cork treats nearly all stderr output as errors, so every successful upgrade produces a "Packages updated with errors" dialog — even though nothing actually failed.

Fix

Expand the ignorable stderr pattern list in Update Packages.swift to cover common benign Homebrew output:

Pattern Reason
Bottle Bottle download/pour status
Fetching Dependency fetching
Downloading Download progress
Already downloaded Cached bottle
Pouring Bottle installation
Installing Package installation
🍺 Homebrew success indicator
Homebrew success indicator
==> Homebrew section headers
Empty lines Blank stderr output

The existing tap and No checksum defined for patterns are preserved.

Only genuinely unexpected stderr output will now trigger the error dialog.

Notes

  • Homebrew is not localized — all CLI output is hardcoded English, so these patterns are locale-agnostic.
  • The emoji patterns (, 🍺) are not language-dependent either.

Homebrew writes progress and status messages (e.g. "✅ Bottle frei0r
(2.5.6)") to stderr by design. Cork was treating nearly all stderr
output as errors, causing a false "Packages updated with errors" dialog
after every successful upgrade.

Expand the ignorable stderr pattern list to cover common benign
Homebrew output: Bottle, Fetching, Downloading, Pouring, Installing,
section headers (==>), success indicators (✅, 🍺), and blank lines.
@matracey
Copy link
Copy Markdown
Contributor Author

@buresdv wondering if you can review this PR when you have a moment?

@buresdv
Copy link
Copy Markdown
Owner

buresdv commented Mar 31, 2026

@matracey How much of this PR was written by an LLM?

@matracey
Copy link
Copy Markdown
Contributor Author

@matracey How much of this PR was written by an LLM?

I wrote the code myself after figuring out that brew was outputting to stderr on my machine - it's like 14 lines. I was trying to minimize the impact of the changes I was introducing.

GitHub generated the PR description.

Is there any issue with this?

@matracey
Copy link
Copy Markdown
Contributor Author

@matracey How much of this PR was written by an LLM?

I wrote the code myself after figuring out that brew was outputting to stderr on my machine - it's like 14 lines. I was trying to minimize the impact of the changes I was introducing.

GitHub generated the PR description.

Is there any issue with this?

If you'd prefer for me to extract this logic to keep it somewhere else, I'm happy to do that. Was just trying to minimize the changes I was making to the existing code.

@buresdv
Copy link
Copy Markdown
Owner

buresdv commented Mar 31, 2026

No problem, I'm just asking because I found the description suspicious. If you wrote the actual code yourself, that's fine.

@buresdv buresdv changed the base branch from main to main.ignorable-updating-messages March 31, 2026 20:21
@buresdv buresdv merged commit 192138c into buresdv:main.ignorable-updating-messages Mar 31, 2026
1 of 2 checks passed
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.

2 participants