mirror of
https://github.com/spf13/viper
synced 2025-04-28 00:07:22 +00:00
Merge 24f9ebe82b
into 1508a7ba44
This commit is contained in:
commit
81c4d93cf1
1 changed files with 2 additions and 2 deletions
4
viper.go
4
viper.go
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue