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
I constated that since YQ version v4.29.0 (precisely, it works with v4.28.2, do not work with 4.31.2 or latest, but I have other error when running v4.29.x or v4.30.x versions), it prunes my header comment while trying to merge documents using the command yq ea '. as $item ireduce ({}; . * $item )' .
Version of yq: 4.29.0 and above.
Operating system: mac or linux
Installed via: docker or binary
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
header.yml:
# **# ** This file was automatically generated ...# ** #
data.yml:
foo: bar
Command
This is working :
> docker run --rm -v "${PWD}":/workdir mikefarah/yq:4.28.2 ea '. as $item ireduce ({}; . * $item )' header.yaml data.yaml
# **
# ** This file was automatically generated ...
# **
foo: bar
Where this is not :
> docker run --rm -v "${PWD}":/workdir mikefarah/yq:4.31.2 ea '. as $item ireduce ({}; . * $item )' header.yaml data.yaml
foo: bar
I'm unsure wether this is a bug or expected behavior since 4.29.0, but as we used this feature to add headers to documents, if it is not a bug what would you suggest to do instead ?
The text was updated successfully, but these errors were encountered:
Describe the bug
Hello,
I constated that since YQ version v4.29.0 (precisely, it works with v4.28.2, do not work with 4.31.2 or latest, but I have other error when running v4.29.x or v4.30.x versions), it prunes my header comment while trying to merge documents using the command
yq ea '. as $item ireduce ({}; . * $item )'
.Version of yq: 4.29.0 and above.
Operating system: mac or linux
Installed via: docker or binary
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
header.yml:
data.yml:
Command
This is working :
Where this is not :
I'm unsure wether this is a bug or expected behavior since 4.29.0, but as we used this feature to add headers to documents, if it is not a bug what would you suggest to do instead ?
The text was updated successfully, but these errors were encountered: