Skip to content

Commit

Permalink
Move verbose flag to per command for new CLI
Browse files Browse the repository at this point in the history
It makes more sense to have the verbose flag on a per command basis as
on a global level. Hence it has been moved to be on a per command
basis.
  • Loading branch information
Patrick Pichler authored and patrickpichler committed Jan 25, 2021
1 parent 211dcbe commit b74b06b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cmd/monaco/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,6 @@ Examples:
Deploy a specific project to a specific tenant:
monaco deploy --environments environments.yaml --specific-environment dev --project myProject
`
app.Flags = []cli.Flag{
&cli.BoolFlag{
Name: "verbose",
Aliases: []string{"v"},
},
}

app.Before = func(c *cli.Context) error {
err := util.SetupLogging(c.Bool("verbose"))

Expand All @@ -224,6 +217,10 @@ func getDeployCommand(fileReader util.FileReader) cli.Command {
Usage: "deployes the given environment",
UsageText: "deploy [command options] [working directory]",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "verbose",
Aliases: []string{"v"},
},
&cli.PathFlag{
Name: "environments",
Usage: "Yaml file containing environment to deploy to",
Expand Down Expand Up @@ -275,6 +272,10 @@ func getDownloadCommand(fileReader util.FileReader) cli.Command {
Usage: "download the given environment",
UsageText: "download [command options] [working directory]",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "verbose",
Aliases: []string{"v"},
},
&cli.PathFlag{
Name: "environments",
Usage: "Yaml file containing environment to deploy to",
Expand Down

0 comments on commit b74b06b

Please sign in to comment.