secret init and secret vault create read the mnemonic with secret.ReadPassphrase. Since #114, every error of that function wraps ErrPassphraseNotRead with the text "failed to read passphrase", so reading the mnemonic without a terminal now reports "failed to read mnemonic: failed to read passphrase: ...", naming a passphrase while a mnemonic is being read.
Definition of done
The error for a mnemonic that could not be read names the mnemonic only (for example "failed to read mnemonic: stdin is not a terminal"), while errors.Is(err, secret.ErrPassphraseNotRead), or a mnemonic counterpart, still identifies the failure; pick the simplest that keeps one error value per failure (#113).
A test pins the message for init without a terminal.
TODO.md updated.
Model: opus-5-5
Noted in the review of https://git.eeqj.de/sneak/secret/pulls/114.
## Problem
`secret init` and `secret vault create` read the mnemonic with `secret.ReadPassphrase`. Since https://git.eeqj.de/sneak/secret/pulls/114, every error of that function wraps `ErrPassphraseNotRead` with the text "failed to read passphrase", so reading the mnemonic without a terminal now reports "failed to read mnemonic: failed to read passphrase: ...", naming a passphrase while a mnemonic is being read.
## Definition of done
- The error for a mnemonic that could not be read names the mnemonic only (for example "failed to read mnemonic: stdin is not a terminal"), while `errors.Is(err, secret.ErrPassphraseNotRead)`, or a mnemonic counterpart, still identifies the failure; pick the simplest that keeps one error value per failure (https://git.eeqj.de/sneak/secret/issues/113).
- A test pins the message for `init` without a terminal.
- `TODO.md` updated.
Model: opus-5-5
Built in #116: the mnemonic is read with the new secret.ReadMnemonic, whose errors wrap the new secret.ErrMnemonicNotRead and name SB_SECRET_MNEMONIC. The passphrase messages change slightly with it; the PR lists how.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/secret/pulls/116: the mnemonic is read with the new `secret.ReadMnemonic`, whose errors wrap the new `secret.ErrMnemonicNotRead` and name `SB_SECRET_MNEMONIC`. The passphrase messages change slightly with it; the PR lists how.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Noted in the review of #114.
Problem
secret initandsecret vault createread the mnemonic withsecret.ReadPassphrase. Since #114, every error of that function wrapsErrPassphraseNotReadwith the text "failed to read passphrase", so reading the mnemonic without a terminal now reports "failed to read mnemonic: failed to read passphrase: ...", naming a passphrase while a mnemonic is being read.Definition of done
errors.Is(err, secret.ErrPassphraseNotRead), or a mnemonic counterpart, still identifies the failure; pick the simplest that keeps one error value per failure (#113).initwithout a terminal.TODO.mdupdated.Model: opus-5-5
Built in #116: the mnemonic is read with the new
secret.ReadMnemonic, whose errors wrap the newsecret.ErrMnemonicNotReadand nameSB_SECRET_MNEMONIC. The passphrase messages change slightly with it; the PR lists how.Model: opus-5-5