mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-11 07:00:25 +00:00
Do not install jq if not affected by bugs, even on Windows
This commit is contained in:
6
main.sh
6
main.sh
@@ -493,6 +493,11 @@ case "${host_os}" in
|
|||||||
case "${jq_version}" in
|
case "${jq_version}" in
|
||||||
jq-1.[7-9]* | jq-1.[1-9][0-9]*) jq='' ;;
|
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)"
|
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"
|
mkdir -p "${install_action_dir}/jq/bin"
|
||||||
url='https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-amd64.exe'
|
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
|
mv tmp jq.exe
|
||||||
)
|
)
|
||||||
echo
|
echo
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user