Skip to content

Commit

Permalink
Merge pull request #6344 from glycerine/partial_fix_6343
Browse files Browse the repository at this point in the history
etcdctl/ctlv3: don't crash when we should prompt for pw.
  • Loading branch information
xiang90 authored Sep 3, 2016
2 parents 0d07154 + cccbf30 commit 2e0dc84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etcdctl/ctlv3/command/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func authCfgFromCmd(cmd *cobra.Command) *authCfg {
var cfg authCfg

splitted := strings.SplitN(userFlag, ":", 2)
if len(splitted) == 0 {
if len(splitted) < 2 {
cfg.username = userFlag
cfg.password, err = speakeasy.Ask("Password: ")
if err != nil {
Expand Down

0 comments on commit 2e0dc84

Please sign in to comment.