Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit

Permalink
Bind command local flags with viper
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Bondar committed Oct 20, 2024
1 parent eef850f commit 79a5961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
}

// Bind flags to the viper before creating the CLI
cmd.Flags().VisitAll(func(flag *pflag.Flag) {
cmd.LocalFlags().VisitAll(func(flag *pflag.Flag) {
if err = viper.BindPFlag(flag.Name, flag); err != nil {
cobra.CheckErr(err)
}
Expand Down

0 comments on commit 79a5961

Please sign in to comment.