Fix: checking for custom file extension was happening without file type

This commit is contained in:
rishavch2104 2025-03-01 22:10:47 +05:30
parent 9c07e0f063
commit 799eb2dbd0

View file

@ -83,8 +83,8 @@ func (v *Viper) searchInPath(in string) (filename string) {
}
if v.configType != "" {
if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b {
return filepath.Join(in, v.configName)
if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+v.configType)); b {
return filepath.Join(in, v.configName+"."+v.configType)
}
}