Douglas Eichelberger 63af8672ce Defer multi-line download failure output until the live redraw finishes
DownloadQueue#fetch's concurrent progress renderer redraws multiple
in-place progress lines using absolute cursor movement, and its
bookkeeping (previous_pending_line_count) assumes every printed
per-download line occupies exactly one terminal row. When a download
failed, the full error detail was printed inline via `ofail`, but that
message can span multiple rows: a Cask download error joins the URL
and raw curl stderr with an explicit newline, and curl's own
`--progress-bar` output uses carriage returns to animate in place. The
loop that prints just-finished downloads discarded the row-count
return value entirely, so after printing a multi-row failure the
cursor ended up further down than the code assumed, and every
subsequent redraw of other in-progress downloads landed on the wrong
rows.

Detailed failure output is now queued via a small
`report_or_defer_failure` helper and printed once the live in-place
redraw has finished and the cursor is restored to normal scrolling,
instead of being printed while the redraw is still live. Every line
printed during the redraw is now guaranteed to be exactly one row, so
the cursor maths stays correct no matter how long the eventual failure
text is.

Two helpers clean up the deferred text itself:

- `Tty.collapse_carriage_returns` simulates how a terminal would
  actually render `\r`-based in-place overwrites, collapsing what can
  be 100+ concatenated curl progress-bar animation frames down to the
  last non-empty one (a `\r` only resets the cursor column, it doesn't
  erase, so a trailing `\r` must not discard the last-written
  content).
- `Utils::Curl.strip_progress_bar` then removes that final
  `--progress-bar` percentage entirely rather than keeping it. A
  leftover percentage can belong to an earlier, unrelated request
  within the same curl invocation (e.g. a redirect hop that completed
  fine before the real target failed to connect), so showing e.g.
  "100.0%" next to a connection failure is misleading rather than
  merely glued-on, and there's no reliable way to tell from the
  captured text whether it ever applied to the transfer that actually
  failed.

Fixes https://github.com/Homebrew/brew/issues/23281
2026-07-26 09:08:16 -07:00
2026-06-10 13:13:51 +01:00
2026-06-13 08:17:31 +01:00
2026-07-25 11:18:27 +01:00
2026-07-24 07:28:12 +00:00
2026-05-20 19:35:06 +01:00
2026-05-04 09:21:18 +01:00
2026-05-19 11:47:11 +01:00
2026-06-10 13:13:51 +01:00
2026-02-02 12:30:22 -05:00
2026-06-06 11:43:48 +01:00
2026-07-21 10:37:27 +00:00

🍺 Homebrew

Latest GitHub release BSD-2-Clause License GitHub Sponsors Open Collective backers and sponsors

See Homebrew's homepage at brew.sh for installation instructions, what homebrew does, packages, brew bundle and more.

Homebrew install demo

💸 Donations

Homebrew is a non-profit project run entirely by volunteers, not employees. We need your funds to pay for software, hardware and hosting around continuous integration and future improvements to the project. Every donation will be spent on making Homebrew better for our users.

Please consider a regular donation through GitHub Sponsors, Open Collective or Patreon. Homebrew is fiscally hosted by the Open Source Collective.

📚 Documentation

Read the Homebrew manual with man brew.

Read installation, troubleshooting, contribution including the FAQ on docs.brew.sh.

Read the Homebrew Blog for release notes, project updates and announcements.

📦 Packages

Find formulae, casks, dependencies, versions and package metadata on formulae.brew.sh.

View anonymised install, build and operating system usage data at formulae.brew.sh/analytics. Read how Homebrew uses Anonymous Analytics.

🔧 Get Help

First, please run brew update and run (and read) brew doctor.

Second, read the Troubleshooting Checklist.

If you don't read these it will take us far longer to help you with your problem.

After this, if you still need help, please ask in Homebrew/discussions or follow (and read) the Homebrew/brew new issue chooser.

💬 Social

Follow Homebrew on Mastodon, Bluesky, 𝕏 (Twitter) or subscribe to the newsletter.

🤝 Contributing

We'd love you to join us and >10,000 others by contributing to Homebrew!

First, please read our Contribution Guide and Code of Conduct.

A good starting point for contributing is:

  • brew tap --force homebrew/core or brew tap --force homebrew/cask (depending on whether you'd rather work on formulae or casks)
  • perform a strict audit on a package you use e.g. brew audit --strict ffmpeg for FFmpeg
  • if no warnings, run brew audit --strict to run on all packages and pick one to fix
  • read through the warnings and fix them until brew audit --strict <package> shows no results
  • submit a pull request with your fixes

Alternatively, for something more substantial, check out one of the open issues in Homebrew/brew, Homebrew/homebrew-core or Homebrew/homebrew-cask.

If you've had inspiration for a new feature or bug fix: we don't need you to open an issue first, just open a pull request with your implementation and we'll review it.

Good luck!

🔐 Security

Please see our security policy for how to report security issues and what is in scope.

👥 Who We Are

Homebrew's Project Leader is Mike McQuaid.

Homebrew's Lead Maintainers are Bevan Kay, Carlo Cabrera, Issy Long, Justin Krehel, Michael Cho, Mike McQuaid, Nanda H Krishna, Patrick Linnane, Rui Chen, Ruoyu Zhong, Sam Ford and Sean Molenaar.

Homebrew's other Maintainers are Andrew Nesbitt, Anton Melnikov, Bo Anderson, Branch Vincent, Caleb Xu, Daeho Ro, Douglas Eichelberger, Dustin Rodrigues, FX Coudert, Klaus Hipp, Markus Reiter, Michka Popoff, Rylan Polster, Stefan Baebler, Thierry Moisan and William Woodruff.

Homebrew was originally created by Max Howell.

📜 License

Code is under the BSD 2-clause "Simplified" License. Documentation is under the Creative Commons Attribution license.

💛 Sponsors

Our macOS continuous integration infrastructure is hosted by MacStadium's Orka.

Powered by MacStadium

Secure password storage and syncing is provided by 1Password for Teams.

1Password

https://brew.sh's DNS is resolving with DNSimple.

DNSimple DNSimple

Homebrew is generously supported by Joshua Baer, Randy Reddig, Codecademy, b.well, Workbrew, GitHub, Custom Ink, SAP and many other users and organisations via GitHub Sponsors.

GitHub

S
Description
No description provided
Readme
205 MiB
Languages
Ruby 93.9%
Shell 4.2%
Roff 1.5%
HTML 0.3%