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
Describe the bug
If removing multiple elements from an array, it seems like yq is computing where they are before doing any of the modifications, then removing those indicies, but as they get removed, the previously-calculated indicies are wrong.
Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: 4.43.1
Operating system: macOS 14.4.1
Installed via: Homebrew
Additional context
Feels kinda like this toy Python example, though here it will blow up if it tries to remove an out-of-bounds index, while if you change "bob" to "deb" in the yq example, then you wind up with it outputting bob/charlie/deb.
Describe the bug
If removing multiple elements from an array, it seems like
yq
is computing where they are before doing any of the modifications, then removing those indicies, but as they get removed, the previously-calculated indicies are wrong.Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: 4.43.1
Operating system: macOS 14.4.1
Installed via: Homebrew
Input Yaml
names.yml:
{"ppl":[{"name":"alice"},{"name":"bob"},{"name":"charlie"},{"name":"deb"}]}
Script
Output
Additional context
Feels kinda like this toy Python example, though here it will blow up if it tries to remove an out-of-bounds index, while if you change "bob" to "deb" in the
yq
example, then you wind up with it outputting bob/charlie/deb.The text was updated successfully, but these errors were encountered: