fix(upgrade): ignore benign Homebrew stderr during package upgrades#603
Conversation
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.
|
@buresdv wondering if you can review this PR when you have a moment? |
|
@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. |
|
No problem, I'm just asking because I found the description suspicious. If you wrote the actual code yourself, that's fine. |
192138c
into
buresdv:main.ignorable-updating-messages
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.swiftto cover common benign Homebrew output:BottleFetchingDownloadingAlready downloadedPouringInstalling🍺✅==>The existing
tapandNo checksum defined forpatterns are preserved.Only genuinely unexpected stderr output will now trigger the error dialog.
Notes
✅,🍺) are not language-dependent either.