`secret vault import` took only a vault without a long-term key, and `secret init` and `secret vault create` give every vault one, so it always failed. A mnemonic enters through those two commands, so the command goes, with its tests and its README entry. The help and the note of `secret generate mnemonic` named `secret import`, which imports a file as a secret; they now name `secret init` and `secret vault create`. `secret vault import` now prints the help of `secret vault` and exits 0, as cobra does for any subcommand of `secret vault` it does not know. Judgement call: TestWorkflowMismatch in internal/vault, which replayed the import step by step, is deleted. Model: opus-5-5
This commit is contained in:
@@ -277,10 +277,6 @@ Selects an unlocker as the current default for operations.
|
||||
Imports a secret from a file and stores it in the current vault under the given
|
||||
name.
|
||||
|
||||
#### `secret vault import [vault-name]`
|
||||
|
||||
Imports a mnemonic phrase into the specified vault (defaults to "default").
|
||||
|
||||
### Encryption Operations
|
||||
|
||||
#### `secret encrypt <secret-name> [--input=file] [--output=file]`
|
||||
@@ -386,9 +382,7 @@ line or in a CI job, they end up in shell history and CI logs. `secret` unsets
|
||||
each one as soon as it has read it, so that the programs it runs itself, such as
|
||||
`gpg`, do not inherit it, but that erases nothing: the environment the process
|
||||
started with, and its memory, still hold the value. The interactive prompt,
|
||||
which every command except `secret vault import` offers when the variable is not
|
||||
set, is the safer default; `secret vault import` has no prompt and needs both
|
||||
variables.
|
||||
which every command offers when the variable is not set, is the safer default.
|
||||
|
||||
The prompt asks on the terminal the command runs in, not on stdin, so it also
|
||||
asks when stdin is a pipe, as in `echo value | secret add name --force` or
|
||||
|
||||
Reference in New Issue
Block a user