1
0
forked from sneak/secret
secret/internal/cli
user 78015afb35 Add secret.Warn() calls for all silent anomalous conditions
Audit of the codebase found 9 locations where errors or anomalous
conditions were silently swallowed or only logged via Debug(). Users
should be informed when something unexpected happens, even if the
program can continue.

Changes:
- DetermineStateDir: warn on config dir fallback to ~/.config
- info_helper: warn when vault/secret stats cannot be read
- unlockers list: warn on metadata read/parse failures (fixes FIXMEs)
- unlockers list: warn on fallback ID generation
- checkUnlockerExists: warn on errors during duplicate checking
- completions: warn on unlocker metadata read/parse failures
- version list: upgrade metadata load failure from Debug to Warn
- secrets: upgrade file close failure from Debug to Warn
- version naming: warn on malformed version directory names

Closes #19
2026-02-20 00:03:49 -08:00
..
cli_test.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
cli.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
completion.go Fix vault creation to require mnemonic and set up initial unlocker 2025-07-26 21:58:57 +02:00
completions.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00
crypto.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
generate.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
info_helper.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00
info.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
init.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
integration_test.go fix: update integration test to allow uppercase secret names 2026-02-19 23:42:39 -08:00
root.go Fix vault creation to require mnemonic and set up initial unlocker 2025-07-26 21:58:57 +02:00
secrets_size_test.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
secrets.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00
stdout_stderr_test.go Fix 'secret get' to output to stdout instead of stderr 2025-07-29 20:01:10 +02:00
test_helpers.go fix: resolve errcheck, gosec, and mnd linter errors 2025-07-09 06:59:01 -07:00
test_output_test.go latest from ai, it broke the tests 2025-06-20 05:40:20 -07:00
unlockers.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00
vault.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
version_test.go refactor: return errors from NewCLIInstance instead of panicking 2026-02-19 23:53:35 -08:00
version.go Add secret.Warn() calls for all silent anomalous conditions 2026-02-20 00:03:49 -08:00