We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When using the V4 yq multiply operator, any anchor associated with an object node appears to be dropped in the output.
Version of yq: 4.4.1 Operating system: macOS 11.1 Installed via: homebrew
Input Yaml
a.yml:
foo: &foo-alias bar: &bar-alias baz a: &c-node b: &b-node c
b.yml:
test: &test-alias node: &node-alias 1
Command
yq eval-all 'select(fileIndex == 0) * select(fileIndex == 1)' a.yml b.yml
Actual behavior
foo: bar: &bar-alias baz a: b: &b-node c test: node: &node-alias 1
Expected behavior
foo: &foo-alias bar: &bar-alias baz a: &c-node b: &b-node c test: &test-alias node: &node-alias 1
Additional context When using yq version 3.4.1 command yq merge a.yml b.yml, the expected behavior is generated
yq merge a.yml b.yml
The text was updated successfully, but these errors were encountered:
Looks like this is related to: #677
Sorry, something went wrong.
Fixed in 4.5.1
Confirmed! Thank you so much.
Confirmed that it's fixed for me too, muchas gracias
I still seem to be having this issue when using the + (append) merge flag @mikefarah
Input yaml a.yml:
:test: :foo: &common - PROP_A :bar: - *common - TEST
:test: :foo: &common - PROP_B
Command yq eval-all 'select(fileIndex == 0) *+ select(fileIndex == 1)' a.yml b.yml > c.yml Actual output c.yml:
yq eval-all 'select(fileIndex == 0) *+ select(fileIndex == 1)' a.yml b.yml > c.yml
:test: :foo: - PROP_A - PROP_B :bar: - *common - TEST
Expected output c.yml:
:test: :foo: &common - PROP_A - PROP_B :bar: - *common - TEST
No branches or pull requests
Describe the bug
When using the V4 yq multiply operator, any anchor associated with an object node appears to be dropped in the output.
Version of yq: 4.4.1
Operating system: macOS 11.1
Installed via: homebrew
Input Yaml
a.yml:
b.yml:
Command
Actual behavior
Expected behavior
Additional context
When using yq version 3.4.1 command
yq merge a.yml b.yml
, the expected behavior is generatedThe text was updated successfully, but these errors were encountered: