From 50fe8a15dead822d381bcfb420ea1bded6ef34d8 Mon Sep 17 00:00:00 2001 From: "Berengar W. Lehr" Date: Sat, 27 Oct 2018 02:11:21 +0200 Subject: [PATCH 1/2] fix: Accept web-command cli flags if web-command is commited * Added flags of default cmd CmdWeb to app-wide flags * If command *is* specified app-wide flags are ignored Resolves: #5065 Signed-off-by: Berengar W. Lehr --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e73f1d60a922c..c5b1bac5cd267 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/cmd" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + // register supported doc types _ "code.gitea.io/gitea/modules/markup/csv" _ "code.gitea.io/gitea/modules/markup/markdown" @@ -48,7 +49,7 @@ arguments - which can alternatively be run by running the subcommand web.` cmd.CmdAdmin, cmd.CmdGenerate, } - app.Flags = append(app.Flags, []cli.Flag{}...) + app.Flags = append(app.Flags, cmd.CmdWeb.Flags...) app.Action = cmd.CmdWeb.Action err := app.Run(os.Args) if err != nil { From 680616b2e4f72ef31d66cf0334f5b40ffad32683 Mon Sep 17 00:00:00 2001 From: Peter Hoffmann Date: Mon, 29 Oct 2018 07:43:04 +0100 Subject: [PATCH 2/2] Removed style breaking newline * broken windows need to be fixed * provides requested change --- main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/main.go b/main.go index c5b1bac5cd267..649da2cab9b77 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,6 @@ import ( "code.gitea.io/gitea/cmd" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - // register supported doc types _ "code.gitea.io/gitea/modules/markup/csv" _ "code.gitea.io/gitea/modules/markup/markdown"