Merge pull request #5242 from MichaelEischer/fix-read-stdin-msg

print password from stdin message only to terminal
This commit is contained in:
Michael Eischer 2025-02-16 18:29:34 +01:00 committed by GitHub
commit 5ddda7f5e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -404,7 +404,9 @@ func ReadPassword(ctx context.Context, opts GlobalOptions, prompt string) (strin
password, err = readPasswordTerminal(ctx, os.Stdin, os.Stderr, prompt)
} else {
password, err = readPassword(os.Stdin)
Verbosef("reading repository password from stdin\n")
if stdoutIsTerminal() {
Verbosef("reading repository password from stdin\n")
}
}
if err != nil {