mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-18 02:29:07 +00: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:
@@ -20,7 +20,6 @@ import (
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"go.woodpecker-ci.org/woodpecker/v2/cli/common"
|
||||
"go.woodpecker-ci.org/woodpecker/v2/cli/internal"
|
||||
"go.woodpecker-ci.org/woodpecker/v2/woodpecker-go/woodpecker"
|
||||
)
|
||||
@@ -30,7 +29,7 @@ var repoUpdateCmd = &cli.Command{
|
||||
Usage: "update a repository",
|
||||
ArgsUsage: "<repo-id|repo-full-name>",
|
||||
Action: repoUpdate,
|
||||
Flags: append(common.GlobalFlags,
|
||||
Flags: []cli.Flag{
|
||||
&cli.BoolFlag{
|
||||
Name: "trusted",
|
||||
Usage: "repository is trusted",
|
||||
@@ -59,7 +58,7 @@ var repoUpdateCmd = &cli.Command{
|
||||
Name: "unsafe",
|
||||
Usage: "validate updating the pipeline-counter is unsafe",
|
||||
},
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
func repoUpdate(c *cli.Context) error {
|
||||
|
Reference in New Issue
Block a user