Skip to content

Commit

Permalink
wrap viper call in cobra.CheckErr
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-frank committed Jun 2, 2021
1 parent f487d37 commit 592bd18
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 @@ -36,7 +36,7 @@ func init() {

// Global Flags
rootCmd.PersistentFlags().Bool("color", false, "colorize output json")
viper.BindPFlag("color", rootCmd.PersistentFlags().Lookup("color")) // allow color flag to be set in config
cobra.CheckErr(viper.BindPFlag("color", rootCmd.PersistentFlags().Lookup("color"))) // allow color flag to be set in config

// Register Commands
rootCmd.AddCommand(newVersionCmd().cmd)
Expand Down

0 comments on commit 592bd18

Please sign in to comment.