We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Prefix is printed if no hit with select(kind == ...) Following the example from https://mikefarah.gitbook.io/yq/recipes#export-as-environment-variables-script-or-any-custom-format I added a prefix to the output. Up to 4.45.2 all was fine but at least since 4.45.4 the prefix is printed if no match found
Version of yq: 4.45.4 Operating system: windows/.... Installed via: manually
Input Yaml data1.yml:
# a: 1 # b: 2 # fruit: # - apple # - banana # - peach
Command The command you ran:
yq '.. | ( ( select(kind == "scalar" and parent | kind != "seq") | "scalar_" + key + "='\''" + . + "'\''" ), ( select(kind == "seq") | "seq_" + key + "=(" + (map("'\''" + . + "'\''") | join(",")) + ")") )' data1.yml
Actual behavior
scalar_ seq_
Expected behavior
no output
Additional context Uncomment scalars or sequence and all is fine.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prefix is printed if no hit with select(kind == ...)
Following the example from https://mikefarah.gitbook.io/yq/recipes#export-as-environment-variables-script-or-any-custom-format I added a prefix to the output. Up to 4.45.2 all was fine but at least since 4.45.4 the prefix is printed if no match found
Version of yq: 4.45.4
Operating system: windows/....
Installed via: manually
Input Yaml
data1.yml:
Command
The command you ran:
Actual behavior
Expected behavior
no output
Additional context
Uncomment scalars or sequence and all is fine.
The text was updated successfully, but these errors were encountered: