Closed DuncanConroy closed 2 months ago
What exactly is the problem? Seems to work fine here:
[dustymabe@hattop ~]$ RELEASE=$(curl https://builds.coreos.fedoraproject.org/prod/streams/stable/releases.json | jq -r .releases[-2].version)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45439 100 45439 0 0 58990 0 --:--:-- --:--:-- --:--:-- 59011
[dustymabe@hattop ~]$ echo $RELEASE
39.20240322.3.0
interesting! maybe it's because I'm on zsh. I get this:
RELEASE=$(curl https://builds.coreos.fedoraproject.org/prod/streams/stable/releases.json | jq -r .releases[-2].version)
zsh: no matches found: .releases[-2].version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
35 45439 35 16009 0 0 50708 0 --:--:-- --:--:-- --:--:-- 50822
curl: (23) Failure writing output to destination
If I download the file and run
cat releases.json| jq -r .releases[-2].version
zsh: no matches found: .releases[-2].version
While if I set it in single quotes, it works:
cat releases.json| jq -r '.releases[-2].version'
39.20240322.3.0
ok. just update the commit message body to mention fix syntax on zsh
that's done, thanks!
sets arguments to jq in single quotes to fix syntax