From a2e1e5c6a0ab5bacafae4f0caa165bbcdf3c6b09 Mon Sep 17 00:00:00 2001 From: Ramesh Nair Date: Wed, 23 Mar 2016 22:53:20 +0800 Subject: [PATCH] [release/1.3.6]: cmd/utils: removed password line endings when not using liner. (cherry picked from commit 6f300344135894970bc417285c2f45f723cd3aa5) --- cmd/utils/cmd.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 5cbb581244..3e00836e14 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -91,6 +91,7 @@ func PromptPassword(prompt string, warnTerm bool) (string, error) { } fmt.Print(prompt) input, err := bufio.NewReader(os.Stdin).ReadString('\n') + input = strings.TrimRight(input, "\r\n") fmt.Println() return input, err }