fix: properly surface config parse errors (#5822)

This commit is contained in:
Andrew Katsikas 2026-03-12 02:34:11 -04:00 committed by GitHub
parent 0542fc0ba4
commit ef2e9992dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,8 @@ func initViper(cmd *cobra.Command) (*viper.Viper, error) {
// Read in configuration
if err := v.ReadInConfig(); err != nil {
if errors.Is(err, viper.ConfigParseError{}) {
if errors.As(err, &viper.ConfigParseError{}) {
return nil, err
}