mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 04:33:28 +02:00
allow login prompt to be interrupted
This commit is contained in:
+5
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user