Fix login add always go interactive (#221)

Flags are not Args

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/221
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
6543 2020-10-05 18:34:10 +00:00 committed by techknowlogick
parent 03ec6d0eee
commit 136688997c

View File

@ -65,7 +65,7 @@ var CmdLoginAdd = cli.Command{
func runLoginAdd(ctx *cli.Context) error { func runLoginAdd(ctx *cli.Context) error {
// if no args create login interactive // if no args create login interactive
if ctx.Args().Len() == 0 { if ctx.NumFlags() == 0 {
return interact.CreateLogin() return interact.CreateLogin()
} }