Route direct-stdout command output through internal/ui (closes #149)
check / check (pull_request) Successful in 1m45s
check / check (pull_request) Successful in 1m45s
version, info, remote info, config, and database delete wrote plain text straight to stdout, so they were unstyled and ignored --quiet. Output now falls in two buckets, both governed by internal/ui. Status lines and confirmations (config init, config set, database delete) go through the ui message methods: styled, and --quiet silences them. The data a command exists to produce is written plain, since a marker would corrupt a table or a parsed document: the version, info, and remote info reports, the snapshot list table, config get values, and the --json documents. --quiet silences the human reports and tables but never the config get value or the --json documents, which a script depends on. The database delete confirmation prompt is always shown; it is an interactive exchange the operator must see. The pure-cli commands reach internal/ui through a small commandUI helper that builds a ui.Writer on the command's stdout in quiet mode when --quiet is set. NewForTesting now supplies a UI writer so the quiet gate is never nil. The README output-style section states the resulting rule. Model: opus-4-8
This commit is contained in:
@@ -25,6 +25,21 @@ release" is exactly the contradiction
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-22: Routed the last direct-to-stdout command output through
|
||||
`internal/ui`
|
||||
([issue #149](https://git.eeqj.de/sneak/vaultik/issues/149)). The
|
||||
`version`, `info`, `remote info`, `config`, and `database delete`
|
||||
commands wrote plain text straight to stdout, so they were unstyled and
|
||||
ignored `--quiet`. Output now falls in two buckets, both governed by
|
||||
`internal/ui`: status lines and confirmations go through its message
|
||||
methods (styled, and `--quiet` silences them), while the data a command
|
||||
exists to produce — the reports, the `snapshot list` table, `config get`
|
||||
values, and the `--json` documents — is written plain. `--quiet`
|
||||
silences the human reports and tables but never the `config get` value
|
||||
or the `--json` documents, which a script depends on, and the
|
||||
`database delete` confirmation prompt is always shown. The README
|
||||
output-style section now states this rule.
|
||||
|
||||
- 2026-09-22: Validated blob hashes, offsets and lengths read back from
|
||||
the destination before using them
|
||||
([issue #155](https://git.eeqj.de/sneak/vaultik/issues/155)). A blob
|
||||
|
||||
Reference in New Issue
Block a user