aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorRamesh Nair <ram@hiddentao.com>2016-03-23 22:53:20 +0800
committerRamesh Nair <ram@hiddentao.com>2016-03-23 22:53:20 +0800
commit6f300344135894970bc417285c2f45f723cd3aa5 (patch)
treee990b4354a8196ef0458b5e7cd048a5fe2be8ccd /cmd
parentb3b110bc951f70df7bd3816033f7a93ed8752c25 (diff)
downloaddexon-6f300344135894970bc417285c2f45f723cd3aa5.tar
dexon-6f300344135894970bc417285c2f45f723cd3aa5.tar.gz
dexon-6f300344135894970bc417285c2f45f723cd3aa5.tar.bz2
dexon-6f300344135894970bc417285c2f45f723cd3aa5.tar.lz
dexon-6f300344135894970bc417285c2f45f723cd3aa5.tar.xz
dexon-6f300344135894970bc417285c2f45f723cd3aa5.tar.zst
dexon-6f300344135894970bc417285c2f45f723cd3aa5.zip
cmd/utils: removed password line endings when not using liner.
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
}