mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-07 22:35:37 +00:00
convert file ext to lowercase for format detection
To ensure proper file format detection with case-insensitive file systems.
This commit is contained in:
parent
b80e1cb35e
commit
570986485f
@ -112,7 +112,7 @@ func FormatStringFromFilename(filename string) string {
|
||||
GetLogger().Debugf("checking file extension '%s' for auto format detection", filename)
|
||||
nPos := strings.LastIndex(filename, ".")
|
||||
if nPos > -1 {
|
||||
format := filename[nPos+1:]
|
||||
format := strings.ToLower(filename[nPos+1:])
|
||||
GetLogger().Debugf("detected format '%s'", format)
|
||||
return format
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user