Display Prompts on STDERR (#70)
Some checks failed
Go / build (push) Has been cancelled

Prompts should be on STDERR

https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/utilities/V3_chap02.html#tag_18_05_03 (under PS1)
This commit is contained in:
Calliope 2025-03-04 11:25:56 -05:00 committed by GitHub
parent b1a82e06d6
commit 43cc96a43d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ func ReadPassword(prompt string) (string, error) {
fd := int(os.Stdin.Fd())
var pass string
if term.IsTerminal(fd) {
fmt.Print(prompt)
fmt.Fprint(os.Stderr, prompt);
inputPass, err := term.ReadPassword(fd)
if err != nil {