yq r - <<EOF
serv:
lol:
<<: &s
bar: ko
foo: ok
wat: *s
EOF
serv:
lol:
foo: ok
wat:
bar: ko
it should give
serv:
lol:
bar: ko
foo: ok
wat:
bar: ko
Yep can confirm, looks like its an issue in the underlying yaml library I'm using - and they won't fix it until v3 comes out.
https://github.com/go-yaml/yaml/issues/184#issuecomment-371859215
go-yaml.v3 is available [blogpost here]!
Any update on this issue?
we're bumping into this too and have to use fun python scripts to work around this functionality.
Not a biggy but would be ace if it could follow anchors
@mikefarah Do you have an ETA for fix this problem?
The problem is that to use the v3 library I basically need to rewrite yq. Just don't have the time for that atm :(
Ok man, I completely understand you. Take your time.
duplicate of https://github.com/mikefarah/yq/issues/264
The problem is that to use the v3 library I basically need to rewrite yq. Just don't have the time for that atm :(
I will try to support this feature
Just released a new version of yaml that fixes this - it's a pretty significant update so it's still in beta: https://github.com/mikefarah/yq/releases/tag/3.0.0-beta
Most helpful comment
Fixed in https://github.com/mikefarah/yq/releases/tag/3.0.1