fix: Accept web-command cli flags if web-command is commited (#5245)

* Added flags of default cmd CmdWeb to app-wide flags
* If command *is* specified app-wide flags are ignored

Backport of #5200
Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>
This commit is contained in:
Peter Hoffmann 2018-11-01 16:24:23 +01:00 committed by techknowlogick
parent 3786369356
commit 14a074f979

View file

@ -48,7 +48,7 @@ arguments - which can alternatively be run by running the subcommand web.`
cmd.CmdAdmin, cmd.CmdAdmin,
cmd.CmdGenerate, cmd.CmdGenerate,
} }
app.Flags = append(app.Flags, []cli.Flag{}...) app.Flags = append(app.Flags, cmd.CmdWeb.Flags...)
app.Action = cmd.CmdWeb.Action app.Action = cmd.CmdWeb.Action
err := app.Run(os.Args) err := app.Run(os.Args)
if err != nil { if err != nil {