1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

config, terminal: use Out rather than TerminalOut where possible

We're going to try to avoid TerminalOut except for redirectStderr,
which overrides that var with a duped copy of stderr.
This commit is contained in:
Carl Edquist
2022-10-06 16:41:26 -05:00
parent 3192e00f4f
commit 0687a263f8
2 changed files with 3 additions and 3 deletions

View File

@@ -716,9 +716,9 @@ func checkPassword(password string) (string, error) {
// GetPassword asks the user for a password with the prompt given. // GetPassword asks the user for a password with the prompt given.
func GetPassword(prompt string) string { func GetPassword(prompt string) string {
_, _ = fmt.Fprintln(terminal.TerminalOutput, prompt) _, _ = fmt.Fprintln(terminal.Out, prompt)
for { for {
_, _ = fmt.Fprint(terminal.TerminalOutput, "password:") _, _ = fmt.Fprint(terminal.Out, "password:")
password := ReadPassword() password := ReadPassword()
password, err := checkPassword(password) password, err := checkPassword(password)
if err == nil { if err == nil {

View File

@@ -34,5 +34,5 @@ func ReadPassword(fd int) ([]byte, error) {
// WriteTerminalTitle writes a string to the terminal title // WriteTerminalTitle writes a string to the terminal title
func WriteTerminalTitle(title string) { func WriteTerminalTitle(title string) {
fmt.Fprintf(TerminalOutput, ChangeTitle + title + BEL) fmt.Fprintf(Out, ChangeTitle + title + BEL)
} }