Open SaberStrat opened 2 months ago
Thanks for reporting. This is a limitation of argparse, which yq relies on to parse arguments and separate them into yq and jq arguments. I'm not aware of a workaround. You might consider using env (environment variables) in jq to pass the value in.
Problem
Trying to pass an argument to the query via
--arg
with a value starting with a dash, even when passed in quotes,yq
throws an error.It looks as if the
--arg
value is interpreted as another argument here.In comparison,
jq
does not throw an error and even allows passing a dash-prefixed--arg
value without quotation marks.Versions
Plattform
Alpine Linux 3.17.0
yq version
3.2.3
Python version
3.9.16
pip version
23.3.2
jq version
1.6-r2