fix(simapp): do not repeat errors (#16865)

This commit is contained in:
Julien Robert
2023-07-07 09:22:36 +00:00
committed by GitHub
parent 7aa79058b2
commit ac6df28bef
3 changed files with 8 additions and 6 deletions
+3 -2
View File
@@ -65,8 +65,9 @@ func NewRootCmd() *cobra.Command {
WithViper("") // In simapp, we don't use any prefix for env variables.
rootCmd := &cobra.Command{
Use: "simd",
Short: "simulation app",
Use: "simd",
Short: "simulation app",
SilenceErrors: true,
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs
cmd.SetOut(cmd.OutOrStdout())
+3 -2
View File
@@ -76,8 +76,9 @@ func NewRootCmd() *cobra.Command {
WithViper("") // In simapp, we don't use any prefix for env variables.
rootCmd := &cobra.Command{
Use: "simd",
Short: "simulation app",
Use: "simd",
Short: "simulation app",
SilenceErrors: true,
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs
cmd.SetOut(cmd.OutOrStdout())