From 305fe47d7b73f1de26d9fc31d6e061e9aefdf00a Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:08:24 +0200 Subject: [PATCH] Only use curl --retry-connrefused when supported fixes #122 --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 23c6000..8f19f1f 100644 --- a/action.yml +++ b/action.yml @@ -67,7 +67,11 @@ runs: - run: | : install rustup if needed if ! command -v rustup &>/dev/null; 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 + 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'