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:
@@ -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 {
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user