allow login prompt to be interrupted

This commit is contained in:
Cory Bennett
2017-09-03 18:57:08 -07:00
parent bccf09f83a
commit 7ab6c22751
+5 -1
View File
@@ -44,13 +44,17 @@ func (o *GlobalOptions) GetPass() string {
if passwd != "" {
return passwd
}
survey.AskOne(
err := survey.AskOne(
&survey.Password{
Message: fmt.Sprintf("Jira Password [%s]: ", o.User),
},
&passwd,
nil,
)
if err != nil {
log.Errorf("%s", err)
panic(Exit{Code: 1})
}
o.SetPass(passwd)
return passwd
}