Do not install jq if not affected by bugs, even on Windows

This commit is contained in:
Taiki Endo
2023-09-16 22:54:11 +09:00
parent af0cad7ea8
commit 13c0d6f598

View File

@@ -493,6 +493,11 @@ case "${host_os}" in
case "${jq_version}" in
jq-1.[7-9]* | jq-1.[1-9][0-9]*) jq='' ;;
*)
_tmp=$(jq <<<"{}" -r .a || echo "")
if [[ "${_tmp}" == "null" ]]; then
jq=''
jq_use_b=''
else
info "old jq (${jq_version}) has bug on Windows; downloading jq 1.7 (will not be added to PATH)"
mkdir -p "${install_action_dir}/jq/bin"
url='https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-amd64.exe'
@@ -503,6 +508,7 @@ case "${host_os}" in
mv tmp jq.exe
)
echo
fi
;;
esac
fi