Skip to content

Commit

Permalink
Add broken curl version check in install.sh
Browse files Browse the repository at this point in the history
And suggest a known work-around for Windows.
  • Loading branch information
thewtex authored Dec 10, 2024
1 parent 1b3f99e commit a57b6c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ else
fi

if hash curl 2> /dev/null; then
# Check that the curl version is not 8.8.0, which is broken for --write-out
# https://github.com/curl/curl/issues/13845
if [[ "$(curl --version | head -n 1 | cut -d ' ' -f 2)" == "8.8.0" ]]; then
echo "error: curl 8.8.0 is known to be broken, please use a different version"
if [[ $(uname -o) == "Msys" ]]; then
echo "A common way to get an updated version of curl is to upgrade Git for Windows:"
echo " https://gitforwindows.org/"
fi
exit 1
fi
HTTP_CODE="$(curl -SL $CURL_OPTIONS "$DOWNLOAD_URL" --output "$TEMP_FILE" --write-out "%{http_code}")"
if [[ "${HTTP_CODE}" -lt 200 || "${HTTP_CODE}" -gt 299 ]]; then
echo "error: '${DOWNLOAD_URL}' is not available"
Expand Down

0 comments on commit a57b6c4

Please sign in to comment.