mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-10 08:35:42 +00:00
Handle YAML case varied booleans in Lua encoder
This commit is contained in:
parent
1ff44c5d52
commit
32277e2c7c
@ -176,6 +176,10 @@ func (le *luaEncoder) encodeAny(writer io.Writer, node *yaml.Node) error {
|
||||
return le.encodeString(writer, node)
|
||||
case "!!null":
|
||||
return writeString(writer, "nil")
|
||||
case "!!bool":
|
||||
// Yaml 1.2 has case variation e.g. True, FALSE etc but Lua only has
|
||||
// lower case
|
||||
return writeString(writer, strings.ToLower(node.Value))
|
||||
default:
|
||||
return writeString(writer, node.Value)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user