Running the tools/get-images.sh with bash tools/get-images.sh produces a syntax error when running a version yq that hasn't been installed via snap.
The error occurs because there are 2 different maintained versions of yq, one that uses Go and one that uses Python. While the Go version supports glob characters, the Python doesn't and produces this error message.
I noticed this because I tried running the script on an Arch Linux installation with yq installed via the package manager. However, this also occurs using Ubuntu, if you install yq with pip (because it installs the Python package).
To Reproduce
Clone the repository with git clone and cd to it
Install the Python package of yq with pip install yq.
Run 'bash tools/get-images.sh`
Environment
Ubuntu 22.04 when installing yq via pip
Arch Linux
Relevant Log Output
jq: error: syntax error, unexpected '*', expecting FORMAT or QQSTRING_START or '[' (Unix shell quoting issues?) at <top-level>, line 1:
.options.*-image | select(.) | .default
jq: 1 compile error
Additional Context
To check the version of yq, you can run yq --version and inspect the output.
When using the Go version, the output should be similar to:
yq (https://github.com/mikefarah/yq/) version v4.44.2
When using the Python version, the output should be similar to:
Bug Description
Running the
tools/get-images.sh
withbash tools/get-images.sh
produces a syntax error when running a versionyq
that hasn't been installed via snap.The error occurs because there are 2 different maintained versions of
yq
, one that uses Go and one that uses Python. While the Go version supports glob characters, the Python doesn't and produces this error message.I noticed this because I tried running the script on an Arch Linux installation with
yq
installed via the package manager. However, this also occurs using Ubuntu, if you installyq
withpip
(because it installs the Python package).To Reproduce
git clone
andcd
to ityq
withpip install yq
.Environment
yq
viapip
Relevant Log Output
Additional Context
To check the version of
yq
, you can runyq --version
and inspect the output. When using the Go version, the output should be similar to:When using the Python version, the output should be similar to: