mirror of
https://github.com/restic/restic.git
synced 2025-03-03 18:26:51 +00:00
Merge pull request #5242 from MichaelEischer/fix-read-stdin-msg
print password from stdin message only to terminal
This commit is contained in:
commit
5ddda7f5e9
1 changed files with 3 additions and 1 deletions
|
@ -404,8 +404,10 @@ 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)
|
||||
if stdoutIsTerminal() {
|
||||
Verbosef("reading repository password from stdin\n")
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "unable to read password")
|
||||
|
|
Loading…
Reference in a new issue