From 136688997c5c7178b4659e0ad67cb7976b73f9fd Mon Sep 17 00:00:00 2001 From: 6543 <6543@noreply.gitea.io> Date: Mon, 5 Oct 2020 18:34:10 +0000 Subject: [PATCH] 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 Reviewed-by: techknowlogick --- cmd/login/add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/login/add.go b/cmd/login/add.go index 96dbde0..ca53c9c 100644 --- a/cmd/login/add.go +++ b/cmd/login/add.go @@ -65,7 +65,7 @@ var CmdLoginAdd = cli.Command{ func runLoginAdd(ctx *cli.Context) error { // if no args create login interactive - if ctx.Args().Len() == 0 { + if ctx.NumFlags() == 0 { return interact.CreateLogin() }