good morning!!!!

Skip to content
Snippets Groups Projects
Commit 9866f19d authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Merge pull request #2371 from hiddentao/fix_prompt_passwd_input

Strip extraneous carriage return from end of entered password
parents 77d21e47 6f300344
No related branches found
No related tags found
No related merge requests found
......@@ -92,6 +92,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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment