From b74b06bf13fab81f673c8941e153ec04c2b10ea5 Mon Sep 17 00:00:00 2001 From: Patrick Pichler Date: Mon, 25 Jan 2021 08:03:54 +0100 Subject: [PATCH] Move verbose flag to per command for new CLI 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. --- cmd/monaco/main.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/monaco/main.go b/cmd/monaco/main.go index c3aaefaf6..1fbf6a4b5 100644 --- a/cmd/monaco/main.go +++ b/cmd/monaco/main.go @@ -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")) @@ -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", @@ -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",