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
Nested anchors of mappings do not retain order.
Version of yq: 4.44.3 Operating system: mac Installed via: binary release
Input Yaml data1.yml:
.global-config: &global-config first: foo second: bar third: baz .local-config: &local-config <<: *global-config first: FOO final-config: <<: *local-config
Command The command you ran:
yq 'explode(.)' data1.yml
Actual behavior
--- .global-config: first: foo second: bar third: baz .local-config: second: bar third: baz first: FOO final-config: second: bar third: baz first: FOO
Expected behavior
--- .global-config: first: foo second: bar third: baz .local-config: first: FOO second: bar third: baz final-config: first: FOO second: bar third: baz
Additional context I tested with Helm using a values.yaml, Python's pyyaml, the Python yq, and each of them do retain order of nested anchors. E.g.,
pyyaml
yq
spec: template: metadata: labels: app.kubernetes.io/managed-by: Helm first: FOO second: bar third: baz
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Nested anchors of mappings do not retain order.
Version of yq: 4.44.3
Operating system: mac
Installed via: binary release
Input Yaml
data1.yml:
Command
The command you ran:
Actual behavior
Expected behavior
Additional context
I tested with Helm using a values.yaml, Python's
pyyaml
, the Pythonyq
, and each of them do retain order of nested anchors. E.g.,The text was updated successfully, but these errors were encountered: