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
Some YAML documents cause yq to panic. I would expect either a clear error message (assuming input is invalid), or no error at all (assuming input is valid).
Version of yq: 4.29.2
Operating system: macOS
Installed via: binary release
Additional context
I don't have a strong opinion on whether the input YAML is valid. Note that if YAML output is requested, no panic occurs; instead, slightly different YAML text is emitted:
---
a: &a
- 0b: &b
- 1c:
!!merge <<: [*a, *b]
This document also causes a panic with yq -o json.
The text was updated successfully, but these errors were encountered:
Oh I see - this is a problem with the yaml, merge anchors only work with maps and both 'a' and 'b' are sequences. I will update yq to return a proper error message.
Describe the bug
Some YAML documents cause yq to panic. I would expect either a clear error message (assuming input is invalid), or no error at all (assuming input is valid).
Version of yq: 4.29.2
Operating system: macOS
Installed via: binary release
Input Yaml
input.yml:
Command
The command you ran:
Actual behavior
Expected behavior
Additional context
I don't have a strong opinion on whether the input YAML is valid. Note that if YAML output is requested, no panic occurs; instead, slightly different YAML text is emitted:
This document also causes a panic with
yq -o json
.The text was updated successfully, but these errors were encountered: