cmd/utils: removed password line endings when not using liner.
This commit is contained in:
parent
b3b110bc95
commit
6f30034413
|
@ -92,6 +92,7 @@ func PromptPassword(prompt string, warnTerm bool) (string, error) {
|
||||||
}
|
}
|
||||||
fmt.Print(prompt)
|
fmt.Print(prompt)
|
||||||
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
||||||
|
input = strings.TrimRight(input, "\r\n")
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
return input, err
|
return input, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue