aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-03-24 01:06:27 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-03-24 01:06:27 +0800
commit9866f19d6af607f629be311cb1c879e8f6472773 (patch)
treefc884654bb62961c74fc0cf37b953bf7679daa7b /cmd
parent77d21e472d25cbd93eed945b8584167919bdc8be (diff)
parent6f300344135894970bc417285c2f45f723cd3aa5 (diff)
downloadgo-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.tar
go-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.tar.gz
go-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.tar.bz2
go-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.tar.lz
go-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.tar.xz
go-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.tar.zst
go-tangerine-9866f19d6af607f629be311cb1c879e8f6472773.zip
Merge pull request #2371 from hiddentao/fix_prompt_passwd_input
Strip extraneous carriage return from end of entered password
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/cmd.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index 7d299026b..eb7907b0c 100644
--- a/cmd/utils/cmd.go
+++ b/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
}