You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not documented anywhere atm. Basically what yq is doing under the hood is looping through each LHS, evaluating the RHS (.referenced) and assigning the result.
The issue is, after .referenced is updated itself, it becomes {type: {type: string}} - from then on that's the value that's used when updating "third" and "fourth" (which is why they get an extra type.
By using the variable, we can evaluate the RHS first and cache it for use in the assignments.
It wouldn't be hard to change the way assignments work - but that could have all sorts of bad side effects for everyone already using yq and relying on the existing behavior.
Describe the bug
=
assignment is broken for nested keys following referenced one-level up property related to them.Version of yq: 4.34.2
Operating system: Linux 22.04 Ubuntu
Installed via: sudo apt install yq
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
type
keys afterreferenced
key are assigned incorrectly. I've compared output withjq
and it works as expected.The text was updated successfully, but these errors were encountered: