Commands fail when currentvault names no vault (closes #156) #182

Merged
clawbot merged 1 commits from fix/156-missing-current-vault into next 2026-10-15 07:14:44 +02:00
1 Commits
Author SHA1 Message Date
sneak b3a9eb3baf Commands fail when currentvault names no vault (closes #156)
check / check (push) Canceled after 0s
An empty currentvault, or one naming a vault that does not exist, made
`secret list` report an empty vault with exit 0 and `secret add` fail on a
missing directory. ResolveVaultSymlink now refuses an empty or invalid
name, or one with no directory under vaults.d, with an error that wraps
ErrVaultNotFound, names the file and says to run
`secret vault select <name>`. Every command that uses the current vault
gets it; `secret vault list` and `secret info` still run.

newSizeTestVault wrote a full path into currentvault, which resolved only
because the last path element was taken as the name; it now relies on
CreateVault selecting the vault.

Model: opus-5-5
2026-10-15 05:02:32 +00:00