Repository navigation
Update: step-by-step progress and # download bar - #258
Merged
Merged
Conversation
--update now prints one 'update: <step>: <detail>' line per step to stderr
(current version, query latest release, select asset, download checksums,
download binary, verify checksum, install, done), and every failure names
its step ('update failed at <step>: ...'). When stderr is a terminal the
binary download draws a '#' bar: percent and bytes with a known
Content-Length, one '#' per 256 KiB otherwise. Non-terminal output has no
carriage returns. With --json, steps and the result are JSONL events on
stdout.
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.
tinyagent --updatenow reports every step and shows a#bar while downloading.error: update failed at verify checksum: ...(exit 1).#bar only when stderr is a terminal (existingisTerminaltty helpers): known Content-Length → redrawn[####....] 42% 3.8 MiB / 9.0 MiB; unknown → one#per 256 KiB then the total. Non-TTY: plain lines, no\r.--json:update.stepevents thenupdate.resulton stdout; no bar, stderr only for the error line.Tests (fakes, httptest, no network): progress bar known/unknown length, step order and content (TTY and non-TTY), up-to-date path, errors naming the step, JSON reporter,
runUpdatetext/JSON/error. Docs: README Updating section + feature bullet, new docs/subcommands.md#updating, json-output.md pointer.