Merge pull request #2371 from hiddentao/fix_prompt_passwd_input

Strip extraneous carriage return from end of entered password
pull/2381/head
Jeffrey Wilcke 9 years ago
commit 9866f19d6a
  1. 1
      cmd/utils/cmd.go

@ -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
}

Loading…
Cancel
Save