We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Cannot use key from array as value for env() function
Version of yq: v4.44.3 Operating system: mac Installed via: homebrew
Input Yaml
configmap: values: FOO: "" BAR: ""
Command
$ FOO=bar yq 'with(.configmap.values[]; . = env(.))' test.yaml
Actual behavior
Error: value for env variable '.' not provided in env()
Expected behavior
configmap: values: FOO: bar BAR: ""
Additional context I tried to use various combinations, but cannot find correct one. Here's example:
$ FOO=bar yq 'with(.configmap.values[]; . = env(FOO))' test.yaml configmap: values: FOO: "bar" BAR: "bar" $ FOO=bar yq 'with(.configmap.values[]; . = env(.))' test.yaml Error: value for env variable '.' not provided in env() $ FOO=bar yq 'with(.configmap.values[]; . = key + "test")' test.yaml configmap: values: FOO: "FOOtest" BAR: "BARtest" $ FOO=bar BAR=baz yq 'with(.configmap.values[]; . = env(key))' test.yaml Error: value for env variable 'key' not provided in env()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Cannot use key from array as value for env() function
Version of yq: v4.44.3
Operating system: mac
Installed via: homebrew
Input Yaml
Command
Actual behavior
Expected behavior
Additional context
I tried to use various combinations, but cannot find correct one.
Here's example:
The text was updated successfully, but these errors were encountered: