]> source.dussan.org Git - gitea.git/commitdiff
fix: Accept web-command cli flags if web-command is commited (#5200)
authorPeter Hoffmann <Hoffmann.P@gmx.net>
Thu, 1 Nov 2018 00:36:41 +0000 (01:36 +0100)
committertechknowlogick <hello@techknowlogick.com>
Thu, 1 Nov 2018 00:36:41 +0000 (20:36 -0400)
* 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 <Berengar.Lehr@kompetenztest.de>
* Removed style breaking newline

* broken windows need to be fixed
* provides requested change

main.go

diff --git a/main.go b/main.go
index a331de4733d38e767413e1f61171f995a6dd592f..a0a52c3ae81ae970a823f7da13ef504f14e9c084 100644 (file)
--- a/main.go
+++ b/main.go
@@ -49,7 +49,7 @@ arguments - which can alternatively be run by running the subcommand web.`
                cmd.CmdGenerate,
                cmd.CmdMigrate,
        }
-       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 {