You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used curl inside of a terminal with a large width (300) to download a file while displaying the loading bar. I tested in both macOS Terminal and iTerm.
I expected the following
The spaceship would be cleared after the file was downloaded, replaced by the full progress bar. The spaceship and progress bar will take up one line total. Instead I saw the following:
The progress bar is capped at a maximum length of 256 but the spaceship flies past that limit and isn't cleared.
When the progress bar was made max width (256 columns), the fly()
function attempted to generate its output buffer too long so that the
trailing carriage return would not fit and then the output would show
wrongly. The fly function is called when the expected total transfer is
unknown, which could be one or more progress calls before the actual
progress meter get shown when the expected transfer size is provided.
This new take also replaces the msnprintf() call with a much simpler
memset() for speed.
Reported-by: Tim Hill
Fixes#12407
It is the initial output that gets written without the carriage return due to math mistakes. I made #12415 that should fix that mistake. It seemed to do it in my tests.
I did this
I used curl inside of a terminal with a large width (300) to download a file while displaying the loading bar. I tested in both macOS Terminal and iTerm.
I expected the following
The spaceship would be cleared after the file was downloaded, replaced by the full progress bar. The spaceship and progress bar will take up one line total. Instead I saw the following:
The progress bar is capped at a maximum length of 256 but the spaceship flies past that limit and isn't cleared.
curl/libcurl version
Default macOS curl:
I've also tried the homebrew install of curl and saw the same results:
operating system
macOS Sonoma 14.1.1
The text was updated successfully, but these errors were encountered: