mirror of
https://github.com/spf13/viper
synced 2025-05-11 06:37:27 +00:00
Fix file search for empty config type
When config type is unset and filename provided with extension viper failed to properly find that file. According to the docs, having set file name with extension is not required to provide config type.
This commit is contained in:
parent
98c63ede11
commit
220da9f354
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ func (v *Viper) searchInPath(in string) (filename string) {
|
|||
}
|
||||
}
|
||||
|
||||
if v.configType != "" {
|
||||
if v.configType == "" {
|
||||
if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b {
|
||||
return filepath.Join(in, v.configName)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue