print password from stdin message only to terminal

This commit is contained in:
Michael Eischer committed 2025-02-07 20:54:18 +01:00
1 parent da47967316
commit 5497217018
1 file changed
+3 -1
+3 -1
View File
@@ -370,7 +370,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 {