From 5dfe136c84938dd091e3282bc54a05ff51c3086b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20N=C3=A4gele?= Date: Tue, 13 Nov 2018 20:53:07 +0100 Subject: [PATCH] Bind debug flag to Viper (#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flag wasn't bound to Viper. Setting it would have no effect. Signed-off-by: Reinhard Nägele --- app/cmd/root.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/cmd/root.go b/app/cmd/root.go index da3d94de..8029d5a5 100644 --- a/app/cmd/root.go +++ b/app/cmd/root.go @@ -18,12 +18,11 @@ import ( "fmt" "os" - "github.com/spf13/viper" - "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" "github.com/spf13/pflag" flag "github.com/spf13/pflag" + "github.com/spf13/viper" ) var ( @@ -96,6 +95,6 @@ func bindFlags(options []string, flagSet *flag.FlagSet, v *viper.Viper) error { } func bindRootFlags(flagSet *flag.FlagSet, v *viper.Viper) error { - options := []string{"remote", "target-branch", "all", "charts", "chart-dirs", "chart-repos", "excluded-charts"} + options := []string{"remote", "target-branch", "all", "charts", "chart-dirs", "chart-repos", "excluded-charts", "debug"} return bindFlags(options, flagSet, v) }