mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 09:58:29 +02:00
Fix helper panic (#676)
Fix helper on get login struct Reviewed-on: https://gitea.com/gitea/tea/pulls/676 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Co-authored-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com> Co-committed-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
This commit is contained in:

committed by
techknowlogick

parent
fe1928679a
commit
c2ddda6800
@ -91,7 +91,9 @@ var CmdLoginHelper = cli.Command{
|
||||
}
|
||||
|
||||
userConfig := config.GetLoginByHost(wants["host"])
|
||||
if len(userConfig.Token) == 0 {
|
||||
if userConfig == nil {
|
||||
log.Fatal("host not exists")
|
||||
} else if len(userConfig.Token) == 0 {
|
||||
log.Fatal("User no set")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user