Skip to content

Commit

Permalink
Capture the error output from viper
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew L Daniel <md@stoi.cc>
  • Loading branch information
mdaniel authored and marccampbell committed Mar 19, 2021
1 parent f442aee commit 021110d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cli/schemaherokubectlcli/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ func ShellCmd() *cobra.Command {
SilenceErrors: true,
SilenceUsage: true,
PreRun: func(cmd *cobra.Command, args []string) {
viper.BindPFlags(cmd.Flags())
if err := viper.BindPFlags(cmd.Flags()); err != nil {
panic(err)
}
},
RunE: func(cmd *cobra.Command, args []string) error {
ctx := context.Background()
Expand Down

0 comments on commit 021110d

Please sign in to comment.