mirror of
https://github.com/spf13/viper
synced 2024-12-23 03:57:01 +00:00
viper.searchInPath matching files with no ext
I think if the user is setting config type explicitly, we shouldn't be matching it with non-ext files but doing it when the extension is not provided.
This commit is contained in:
parent
bba82cfc61
commit
abc5f3d680
1 changed files with 1 additions and 1 deletions
2
viper.go
2
viper.go
|
@ -2119,7 +2119,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…
Reference in a new issue