mirror of
https://github.com/rclone/rclone.git
synced 2025-02-05 05:00:34 +01: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:
parent
3192e00f4f
commit
0687a263f8
@ -716,9 +716,9 @@ func checkPassword(password string) (string, error) {
|
||||
|
||||
// GetPassword asks the user for a password with the prompt given.
|
||||
func GetPassword(prompt string) string {
|
||||
_, _ = fmt.Fprintln(terminal.TerminalOutput, prompt)
|
||||
_, _ = fmt.Fprintln(terminal.Out, prompt)
|
||||
for {
|
||||
_, _ = fmt.Fprint(terminal.TerminalOutput, "password:")
|
||||
_, _ = fmt.Fprint(terminal.Out, "password:")
|
||||
password := ReadPassword()
|
||||
password, err := checkPassword(password)
|
||||
if err == nil {
|
||||
|
@ -34,5 +34,5 @@ func ReadPassword(fd int) ([]byte, error) {
|
||||
|
||||
// WriteTerminalTitle writes a string to the terminal title
|
||||
func WriteTerminalTitle(title string) {
|
||||
fmt.Fprintf(TerminalOutput, ChangeTitle + title + BEL)
|
||||
fmt.Fprintf(Out, ChangeTitle + title + BEL)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user