Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchors not working #178

Closed
caub opened this issue Sep 24, 2018 · 11 comments
Closed

Anchors not working #178

caub opened this issue Sep 24, 2018 · 11 comments

Comments

@caub
Copy link

caub commented Sep 24, 2018

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
@mikefarah mikefarah added the bug label Oct 8, 2018
@mikefarah
Copy link
Owner

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.

go-yaml/yaml#184 (comment)

@taraspos
Copy link

taraspos commented Apr 6, 2019

go-yaml.v3 is available [blogpost here]!

@qvistgaard
Copy link

Any update on this issue?

@thelangley
Copy link

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

@galindro
Copy link

@mikefarah Do you have an ETA for fix this problem?

@mikefarah
Copy link
Owner

The problem is that to use the v3 library I basically need to rewrite yq. Just don't have the time for that atm :(

@galindro
Copy link

Ok man, I completely understand you. Take your time.

@jk2K
Copy link

jk2K commented Nov 13, 2019

duplicate of #264

@jk2K
Copy link

jk2K commented Nov 13, 2019

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

@mikefarah
Copy link
Owner

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

@mikefarah
Copy link
Owner

Fixed in https://github.com/mikefarah/yq/releases/tag/3.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants