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
I'm trying to work with anchors and alias operators but I'm getting an error merge anchor only supports maps, got !!seq instead while I'm exploding the yaml.
It seems the line - <<: *my-anchor is the problem since I can work without that line but if it exists then throw the error.
Docs say
yq supports merge aliases (like <<: *blah) ...
So I didn't expected the error.
Version of yq: 4.44.3
Operating system: linux
Installed via: binary release
Error: merge anchor only supports maps, got !!seq instead
Expected behavior
Just expand yaml and generate something like this:
---
level_1:
- name: onelevel_2:
- name: one_v1level_3:
- name: foo
- name: twolevel_2:
- name: one_v1 # this is the anchor propertylevel_3:
- name: foo
- name: one_v1level_3:
- name: bar
I've tried using other linters but format seems ok and could be possible to expand.
Also I've tried to expand without - <<: *my-anchor line and not throw an error and I've run yq '.level_1[0] | explode(.)' data1.yml and also works fine. So problem seems to be the definition - <<: *my-anchor.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to work with anchors and alias operators but I'm getting an error
merge anchor only supports maps, got !!seq instead
while I'm exploding the yaml.It seems the line
- <<: *my-anchor
is the problem since I can work without that line but if it exists then throw the error.Docs say
So I didn't expected the error.
Version of yq: 4.44.3
Operating system: linux
Installed via: binary release
Input Yaml
Command
Actual behavior
It throws an error:
Error: merge anchor only supports maps, got !!seq instead
Expected behavior
Just expand yaml and generate something like this:
I've tried using other linters but format seems ok and could be possible to expand.
Also I've tried to expand without
- <<: *my-anchor
line and not throw an error and I've runyq '.level_1[0] | explode(.)' data1.yml
and also works fine. So problem seems to be the definition- <<: *my-anchor
.The text was updated successfully, but these errors were encountered: