fix(install): collapse the download meter to a single blue progress line - #133
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Installing the CLI currently prints curl's default transfer meter — a three-line table, twice
(once for the tarball, once for the checksum):
This replaces it with a single line that stays on one line, in the project's own accent blue:
How
curl -fsS -L,wget -q) and run in the background; theprogress line is drawn from the growing output file against
Content-Length, redrawn with\r+\033[K, and terminated by exactly one newline.#0b63f6, matching the badges in the README: 24-bit whenCOLORTERMadvertisestruecolor, 256-colour otherwise.
Degradation
| tee)NO_COLORset, orTERM=dumb#/-instead of█/░Content-Length(chunked)wgetinstead ofcurlBar width adapts to the terminal (24 / 16 / 8 blocks) so the line never wraps — a wrapped
line would smear across redraws. Width is read via
stty size <&3, because inside thecommand substitution that captures it fd 1 is the pipe, not the terminal, and
tput colsreports the terminfo default of 80 regardless of the real window.
Failure handling is unchanged
A failed transfer still aborts the install with curl's exit status; the progress line is
cleared first and the failing URL is printed. Checksum verification, the codesign check, and
the atomic binary/directory replacement are all untouched.
Testing
Verified on macOS arm64 against the real v0.2.1 release (47.5 MB):
NO_COLOR=1,TERM=dumb,LANG=C, and piped-to-catpaths each checkedATOMIC_AGENT_VERSION=v0.0.0-does-not-existexits non-zero, prints the URL,installs nothing
scripts/install.ps1is untouched; the Windows meter is a separate change.