Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear line properly for download progress.
The workaround here that was printing many spaces did not work properly if the line length got very long and then very short again. I noticed this problem on an old version of rustup that still suffered from rust-lang#1696, so it might not technically be reproducible anymore, but I figured we might as well fix this for the future anyway! I suspect the comment saying `delete_line()` didn't clear the line properly was attempting to call it *after* printing the current download progress, but the `term` crate docs say it deletes from the cursor position to the end of the line. To deal with that, we instead jump to the start of the line *before* printing the current download progress and call `delete_line()` there.
- Loading branch information