Print the mnemonic and the vault and unlocker listings to stdout (closes #138)
check / check (push) Waiting to run
check / check (push) Waiting to run
`secret generate mnemonic`, `secret vault list` and `secret unlocker list`, in text and `--json` form, printed through cobra's `cmd.Println` and `cmd.Printf`. Those write to stderr when no output writer is set, and the binary sets none, so a pipe or `$(...)` got nothing. They now write to `cmd.OutOrStdout()`, as `secret list` does, and so does "No versions found" from `secret version list`. Status messages and the warning printed after the mnemonic stay on stderr. A new test runs the built binary and reads the stdout of `generate mnemonic` and of both listings in both forms. Model: opus-5-5
This commit is contained in:
@@ -18,6 +18,14 @@ https://git.eeqj.de/sneak/secret/milestone/12
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-14: `secret generate mnemonic`, `secret vault list` and
|
||||
`secret unlocker list` print their output to stdout, as `secret list` does, so
|
||||
it can be piped or captured (https://git.eeqj.de/sneak/secret/issues/138).
|
||||
They printed with cobra's `cmd.Println` and `cmd.Printf`, which write to
|
||||
stderr when no output writer is set, so `secret vault list --json | jq`
|
||||
received nothing. "No versions found" from `secret version list` moved to
|
||||
stdout too. Messages such as "Created vault", and the warning after the
|
||||
mnemonic, stay on stderr.
|
||||
- 2026-10-14: Removing the current unlocker no longer leaves the vault unable to
|
||||
open through the unlockers it still has
|
||||
(https://git.eeqj.de/sneak/secret/issues/137). `current-unlocker` went on
|
||||
|
||||
Reference in New Issue
Block a user