mirror of https://github.com/spf13/viper.git
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
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 {
|
if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b {
|
||||||
return filepath.Join(in, v.configName)
|
return filepath.Join(in, v.configName)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue