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
Bug-Desciption
My use case is to add an environment variable to all given services in a docker-compose.yml file – without knowing the service names.
Unfortunately the specific list of environment-variables of each services is not appended with the new variable, but only the very first occurrence of the array is appended correctly and then copied wrongly the whole resulting array of the first service to all other services.
Version of yq: 4.4.1 & 4.6.1
Operating system: mac & linux
Installed on linux via:
Additional context
My current workaround is to use yq to transform the file into JSON, modifying with jq and using yq again to re-transform the result into YAML – which is actually very ugly:
ak-at-gvl
changed the title
adding item to array for multiple path works unexpectedly
adding item to array for multiple paths with unexpected result
Mar 15, 2021
Bug-Desciption
My use case is to add an environment variable to all given services in a docker-compose.yml file – without knowing the service names.
Unfortunately the specific list of environment-variables of each services is not appended with the new variable, but only the very first occurrence of the array is appended correctly and then copied wrongly the whole resulting array of the first service to all other services.
Version of yq: 4.4.1 & 4.6.1
Operating system: mac & linux
Installed on linux via:
on mac via homebrew
Input Yaml
sample.yaml:
Command
The command i ran:
Actual behavior
Expected behavior
Additional context
My current workaround is to use
yq
to transform the file into JSON, modifying withjq
and usingyq
again to re-transform the result into YAML – which is actually very ugly:The text was updated successfully, but these errors were encountered: