1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-12-11 21:57:08 +02:00

Fix flags added multiple times (#2914)

Closes https://github.com/woodpecker-ci/woodpecker/issues/2912

Global flags should not be added to the commands/subscommands, only
globally.
This commit is contained in:
qwerty287
2023-12-08 09:36:53 +01:00
committed by GitHub
parent adb2c82790
commit a796885ad4
52 changed files with 55 additions and 120 deletions

View File

@@ -29,14 +29,14 @@ var pipelineLastCmd = &cli.Command{
Usage: "show latest pipeline details",
ArgsUsage: "<repo-id|repo-full-name>",
Action: pipelineLast,
Flags: append(common.GlobalFlags,
Flags: []cli.Flag{
common.FormatFlag(tmplPipelineInfo),
&cli.StringFlag{
Name: "branch",
Usage: "branch name",
Value: "main",
},
),
},
}
func pipelineLast(c *cli.Context) error {