Only use curl --retry-connrefused when supported

fixes #122
This commit is contained in:
fap 2024-09-23 19:08:24 +02:00
parent 7b1c307e0d
commit 305fe47d7b

View file

@ -67,7 +67,11 @@ runs:
- run: |
: install rustup if needed
if ! command -v rustup &>/dev/null; then
if curl --help curl | grep --quiet retry-connrefused; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
else
curl --proto '=https' --tlsv1.2 --retry 10 --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
fi
echo "$CARGO_HOME/bin" >> $GITHUB_PATH
fi
if: runner.os != 'Windows'