Skip corrupt unlocker metadata in unlocker select and remove (closes #72)
check / check (push) Failing after 2s
check / check (push) Failing after 2s
findUnlockerByID failed on the first unlocker directory whose metadata could not be checked, read or parsed, so `secret unlocker select` and `remove` failed when one sorted before the unlocker asked for. It now skips such a directory with the warning ListUnlockers gives, through the code both now share. A skipped directory is removed by its directory name, with RemoveDirAtomic, and cannot be selected. `unlocker remove` applies the last-unlocker check only when the ID is that of the single listed unlocker, so removing a skipped directory is never refused as removing the last one. Model: opus-5-5
This commit is contained in:
@@ -198,7 +198,9 @@ Creates a new unlocker of the specified type:
|
||||
|
||||
**DANGER**: Permanently removes an unlocker. Like Unix `rm`, this command
|
||||
does not ask for confirmation. Cannot remove the last unlocker if the vault
|
||||
has secrets unless --force is used.
|
||||
has secrets unless --force is used. An unlocker directory that
|
||||
`secret unlocker list` skips with a warning, because its metadata cannot be
|
||||
read or parsed, is removed by the directory name the warning gives.
|
||||
- `--force, -f`: Force removal of last unlocker even if vault has secrets
|
||||
- **CRITICAL WARNING**: Without unlockers and without your mnemonic phrase,
|
||||
vault data will be PERMANENTLY INACCESSIBLE
|
||||
|
||||
Reference in New Issue
Block a user