Skip to content

Commit

Permalink
Fix gam-install.sh #1741
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed Jan 31, 2025
1 parent 367c23a commit e744aa2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gam-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,20 @@ else
check_type="authenticated"
curl_opts=( "$GHCLIENT" )
fi
curl_ver=$(curl --version|head -1|cut -d " " -f 2)
if [[ "${curl_ver:0:4}" < "7.76" ]]; then
curl_fail=( )
else
curl_fail=( "--fail-with-body" )
fi
echo_yellow "Checking GitHub URL $release_url for $gamversion GAM release ($check_type)..."
release_json=$(curl \
--silent \
"${curl_opts[@]}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$release_url" \
--fail-with-body)
"${curl_fail[@]}")
curl_exit_code=$?
if [ $curl_exit_code -ne 0 ]; then
echo_red "ERROR retrieving URL: ${release_json}"
Expand Down

0 comments on commit e744aa2

Please # to comment.