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 Appending to a sequence inplace unsets its anchor. It shouldn't affect the anchor at all, and should've only affected the sequence.
Version of yq: 4.25.3 Operating system: mac Installed via: homebrew
Input Yaml Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less) data1.yml:
a: &hello - x - y b: *hello
Command The command you ran:
yq -i '.a += ["z"]' data1.yml
Actual behavior
a: - x - y - z b: *hello
Expected behavior
a: &hello - x - y - z b: *hello
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Yep that's a bug - will fix in the next release.
As a workaround, you can do the following:
yq '.a = .a + "z"' file.yaml
Sorry, something went wrong.
f393cf3
Sorry github autoclosed - will close when the fix is actually released..
Fixed in v4.26.1
No branches or pull requests
Describe the bug
Appending to a sequence inplace unsets its anchor.
It shouldn't affect the anchor at all, and should've only affected the sequence.
Version of yq: 4.25.3
Operating system: mac
Installed via: homebrew
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:
Command
The command you ran:
Actual behavior
Expected behavior
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: