This commit is contained in:
MagaSerdarov 2025-03-28 09:42:14 -04:00 committed by GitHub
commit 81c4d93cf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1494,7 +1494,7 @@ func (v *Viper) ReadInConfig() error {
v.logger.Debug("reading file", "file", filename)
file, err := afero.ReadFile(v.fs, filename)
if err != nil {
return err
return ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)}
}
config := make(map[string]any)
@ -1524,7 +1524,7 @@ func (v *Viper) MergeInConfig() error {
file, err := afero.ReadFile(v.fs, filename)
if err != nil {
return err
return ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)}
}
return v.MergeConfig(bytes.NewReader(file))