From e651aa4134d3985e5f8882c9363a5b505b7c1adf Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:19:00 +0200 Subject: [PATCH] DRY up the code --- action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 8f19f1f..033db72 100644 --- a/action.yml +++ b/action.yml @@ -68,10 +68,9 @@ runs: : 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 + OPTIONAL_CURL_ARGUMENT="--retry-connrefused" fi + curl --proto '=https' --tlsv1.2 --retry 10 $OPTIONAL_CURL_ARGUMENT --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y echo "$CARGO_HOME/bin" >> $GITHUB_PATH fi if: runner.os != 'Windows'