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
When I try to replace a value within the second document of a YAML file containing multiple documents the first documents is removed, where I expect that the files stays intact. Hopefully there is an other way of doing this or a workaround. I saw one related issue, but that one is already closed: #351
With brackets, this finds the matches of ( select(documentIndex==1 ) | .bar[].version) and updates that.
Without the brackets, this first selects documentIndex 1 (and leaves all the others out) and then, separately, finds the matches of (.bar[].version) and updates that.
Describe the bug
When I try to replace a value within the second document of a YAML file containing multiple documents the first documents is removed, where I expect that the files stays intact. Hopefully there is an other way of doing this or a workaround. I saw one related issue, but that one is already closed: #351
Version of yq: 4.X.X
yq (https://github.com/mikefarah/yq/) version 4.16.2
OS: Windows WSL
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:
(I got this example from: https://mikefarah.gitbook.io/yq/upgrading-from-v3#multiple-documents)
Actual behavior
The new file:
Expected behavior
The text was updated successfully, but these errors were encountered: