You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you delete the last element of a list or a map, but if there is a comment on this list, the generated yaml is not valid. The empty list/map is put on a new line without any space behind.
Version of yq: 4.42.1
Operating system: windows
Installed via: binary release
Input Yaml
data1.yml:
test:
foo: #bar
- bar
data2.yml:
test:
foo: #barbar: 1
Command
The command you ran:
yq e "del(.test.foo[])" data1.yaml
yq e "del(.test.foo.bar)" data2.yaml
Actual behavior
test:
foo: #bar[]test:
foo: #bar{}
Expected behavior
test:
foo: #bar[]test:
foo: #bar{}
The text was updated successfully, but these errors were encountered:
Describe the bug
When you delete the last element of a list or a map, but if there is a comment on this list, the generated yaml is not valid. The empty list/map is put on a new line without any space behind.
Version of yq: 4.42.1
Operating system: windows
Installed via: binary release
Input Yaml
data1.yml:
data2.yml:
Command
The command you ran:
Actual behavior
Expected behavior
The text was updated successfully, but these errors were encountered: