fix: use errors.As as viper uses a custom error struct
This commit is contained in:
parent
eef49c34be
commit
fc6240c149
|
@ -269,7 +269,7 @@ func newConfig() (*viper.Viper, error) {
|
|||
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
if !errors.Is(err, &viper.ConfigFileNotFoundError{}) {
|
||||
if !errors.As(err, &viper.ConfigFileNotFoundError{}) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue