Refuse an existing vault before asking for the mnemonic #177

Merged
clawbot merged 1 commits from fix/151-refuse-existing-vault-before-prompt into next 2026-10-15 01:32:24 +02:00
1 Commits
Author SHA1 Message Date
sneak f91dba85cd Refuse an existing vault before asking for the mnemonic (closes #151)
check / check (push) Waiting to run
`secret init` and `secret vault create` asked for the mnemonic and the
unlocker passphrase, and `secret init` printed "Initialized secrets
manager at", before refusing a vault that already exists. The check
`vault.CreateVault` made before writing is now `vault.CheckNewVaultName`,
which both commands call while holding the state directory lock, before
the first prompt; `CreateVault` still calls it. `secret init` prints the
"Initialized" line only once the vault is created, so
`TestMnemonicNotReadNamesOnlyMnemonic` no longer expects it.

Judgement call: the same check validates the name, so `secret vault
create` with an invalid name also fails before the prompts.

Model: opus-5-5
2026-10-14 22:33:44 +00:00