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 piping a file to yq as one input with another file as the other input there is a runtime error. However, providing the two files as arguments works.
Version of yq: 4.24.5
Operating system: Linux (Fedora 33)
Installed via: binary release
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
namespace.yml
Additional context
The goal is to append the Namespace resource to the app.yml without needing to have seperate files, i.e. the namespace.yml would be piped into yq inside of a bash script.
The text was updated successfully, but these errors were encountered:
Ok I found the bug - it's with appending to a map when the new key entry matches a value in an existing map (in this case namespace). I'll have a fix in the next release, till then, as a workaround, instead of .metadata += {"namespace": env(Namespace)} just do .metadata.namespace = env(Namespace)
Glad you found the bug quickly! Also I didn't know that syntax .metadata.namespace = env(Namespace) would add a key value pair, glad to have learned that.
Describe the bug
When piping a file to
yq
as one input with another file as the other input there is a runtime error. However, providing the two files as arguments works.Version of yq: 4.24.5
Operating system: Linux (Fedora 33)
Installed via: binary release
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
namespace.yml
app.yml
Command
Actual behavior
Expected behavior
Additional context
The goal is to append the Namespace resource to the app.yml without needing to have seperate files, i.e. the namespace.yml would be piped into
yq
inside of a bash script.The text was updated successfully, but these errors were encountered: