check / check (push) Waiting to run
term.ReadPassword reads the terminal with a raw read that returns 0 bytes at the end of input and takes that as nothing yet, so Ctrl-D at the prompt did nothing. On the Unix systems the prompt now sets the terminal as ReadPassword does and reads the line from standard input, which reports the end of input; elsewhere, such as Windows, it still uses ReadPassword. Ctrl-D with nothing typed gives an empty mnemonic, refused with status 1, and the terminal settings are put back. A test types Ctrl-D at the prompt on a pseudo-terminal. Unverified: the prompt was run only on Linux; other systems were built. Deviation: a Ctrl-H byte is no longer a backspace at the prompt. Model: opus-5-5 Co-authored-by: clawbot <sneak+clawbot@sneak.cloud>
13 lines
262 B
Go
13 lines
262 B
Go
//go:build aix || linux || solaris || zos
|
|
|
|
package mnemonic
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
// The requests that read and set the terminal settings, as
|
|
// golang.org/x/term names them.
|
|
const (
|
|
ioctlReadTermios = unix.TCGETS
|
|
ioctlWriteTermios = unix.TCSETS
|
|
)
|