mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-30 19:06:21 +00:00
Return config parse errors (#182)
This commit is contained in:
committed by
Anton Kaliaev
parent
e9cf47606c
commit
6e26392209
@@ -139,9 +139,8 @@ func bindFlagsLoadViper(cmd *cobra.Command, args []string) error {
|
||||
// stderr, so if we redirect output to json file, this doesn't appear
|
||||
// fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
|
||||
} else if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
||||
// we ignore not found error, only parse error
|
||||
// stderr, so if we redirect output to json file, this doesn't appear
|
||||
fmt.Fprintf(os.Stderr, "%#v", err)
|
||||
// ignore not found error, return other errors
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user