mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-08 14:55:42 +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)
|
GetLogger().Debugf("checking file extension '%s' for auto format detection", filename)
|
||||||
nPos := strings.LastIndex(filename, ".")
|
nPos := strings.LastIndex(filename, ".")
|
||||||
if nPos > -1 {
|
if nPos > -1 {
|
||||||
format := filename[nPos+1:]
|
format := strings.ToLower(filename[nPos+1:])
|
||||||
GetLogger().Debugf("detected format '%s'", format)
|
GetLogger().Debugf("detected format '%s'", format)
|
||||||
return format
|
return format
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user