Skip to content

Commit

Permalink
Bind debug flag to Viper (#50)
Browse files Browse the repository at this point in the history
The flag wasn't bound to Viper. Setting it would have no effect.

Signed-off-by: Reinhard Nägele <[email protected]>
  • Loading branch information
unguiculus authored Nov 13, 2018
1 parent e5f3cd4 commit 5dfe136
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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)
}

0 comments on commit 5dfe136

Please sign in to comment.