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
After changes made to passing positional parameters to jq, it looks like --from-file filter is broken and the filter for jq must be defined as the jq_filter of yq. This means you can no longer define filters in a file, which is invaluable for more complex constructs.
Example Setup
Define a filter and some yaml data
[yq] cat filter.foo[yq] cat datafoo a: 1
2.3.4
Positional arguments are broken
[yq] yq -y --arg a b . datausage: yq [-h] [--yaml-output] [--width WIDTH] [--version] jq_filter [files [files ...]]yq: error: argument files: can't open 'b': [Errno 2] No such file or directory: 'b'
--from-file without jq_filter works
[yq] yq -y --from-file filter dataa: 1
2.3.5
After changes to positional parameters, the --args example now works
[yq] yq -y --arg a b . datafoo: a: 1
...but the --from-file example is broken, returning the --help text with a return code 0.
Updated the issue after further investigation revealed the initial report was over simplified.
brydoncheyney
changed the title
Command line arguments to jq are broken since 2.3.5
--from-file positional parameter not passed to jq since 2.3.5
Feb 6, 2018
After changes made to passing positional parameters to jq, it looks like
--from-file filter
is broken and the filter for jq must be defined as thejq_filter
ofyq
. This means you can no longer define filters in a file, which is invaluable for more complex constructs.Example Setup
Define a filter and some yaml data
2.3.4
Positional arguments are broken
--from-file
withoutjq_filter
works2.3.5
After changes to positional parameters, the
--args
example now works...but the
--from-file
example is broken, returning the--help
text with a return code 0.trying to define the call with the self identify filter still fails to work, returning no error message but a return code of 2.
The text was updated successfully, but these errors were encountered: