Skip to content

Commit

Permalink
Fix: checking for custom file extension was happening without file type
Browse files Browse the repository at this point in the history
  • Loading branch information
rishavch2104 committed Mar 1, 2025
1 parent 9c07e0f commit 799eb2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 799eb2d

Please sign in to comment.