At the terminal prompt (mnemonic: ), pressing Ctrl-D (end of input) does nothing: the tool goes on waiting, however often it is pressed. The only ways out are typing a mnemonic or a signal (Ctrl-C). The README says the prompt reads "with echo turned off" and says what signals do; a user who wants to back out of the prompt expects Ctrl-D to end it, as it does for ssh or sudo.
Where: internal/mnemonic/mnemonic.go:96, term.ReadPassword. The library reads the terminal one byte at a time with a raw read that returns 0 bytes on Ctrl-D, and treats 0 bytes as "nothing yet" and reads again.
How to see: on a terminal, with no mnemonic source set,
./keyfunc age pub
then press Ctrl-D at the prompt, twice: nothing happens. Ctrl-C ends it with status 130.
Definition of done: end of input at the prompt ends the tool with a message on standard error, status 1 and the terminal's echo restored, and the README's "Giving it the mnemonic" says so. A test that runs the tool as a subprocess on a pseudo-terminal (as internal/cli/age_test.go already runs it as a subprocess) and sends end of input at the prompt.
Severity: minor. Nothing is derived or lost; the user is stuck until Ctrl-C.
Model: fable-5-1
At the terminal prompt (`mnemonic: `), pressing Ctrl-D (end of input) does nothing: the tool goes on waiting, however often it is pressed. The only ways out are typing a mnemonic or a signal (Ctrl-C). The README says the prompt reads "with echo turned off" and says what signals do; a user who wants to back out of the prompt expects Ctrl-D to end it, as it does for `ssh` or `sudo`.
Where: `internal/mnemonic/mnemonic.go:96`, `term.ReadPassword`. The library reads the terminal one byte at a time with a raw read that returns 0 bytes on Ctrl-D, and treats 0 bytes as "nothing yet" and reads again.
How to see: on a terminal, with no mnemonic source set,
./keyfunc age pub
then press Ctrl-D at the prompt, twice: nothing happens. Ctrl-C ends it with status 130.
**Definition of done**: end of input at the prompt ends the tool with a message on standard error, status 1 and the terminal's echo restored, and the README's "Giving it the mnemonic" says so. A test that runs the tool as a subprocess on a pseudo-terminal (as `internal/cli/age_test.go` already runs it as a subprocess) and sends end of input at the prompt.
Severity: minor. Nothing is derived or lost; the user is stuck until Ctrl-C.
Model: fable-5-1
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.
At the terminal prompt (
mnemonic:), pressing Ctrl-D (end of input) does nothing: the tool goes on waiting, however often it is pressed. The only ways out are typing a mnemonic or a signal (Ctrl-C). The README says the prompt reads "with echo turned off" and says what signals do; a user who wants to back out of the prompt expects Ctrl-D to end it, as it does forsshorsudo.Where:
internal/mnemonic/mnemonic.go:96,term.ReadPassword. The library reads the terminal one byte at a time with a raw read that returns 0 bytes on Ctrl-D, and treats 0 bytes as "nothing yet" and reads again.How to see: on a terminal, with no mnemonic source set,
then press Ctrl-D at the prompt, twice: nothing happens. Ctrl-C ends it with status 130.
Definition of done: end of input at the prompt ends the tool with a message on standard error, status 1 and the terminal's echo restored, and the README's "Giving it the mnemonic" says so. A test that runs the tool as a subprocess on a pseudo-terminal (as
internal/cli/age_test.goalready runs it as a subprocess) and sends end of input at the prompt.Severity: minor. Nothing is derived or lost; the user is stuck until Ctrl-C.
Model: fable-5-1