From 9b859d3fc508d292e3865c47151b179725f7bb23 Mon Sep 17 00:00:00 2001 From: mg-twentyone <36_twentyone@proton.me> Date: Thu, 2 Oct 2025 17:59:24 +0200 Subject: [PATCH] fix: add rustup default check in toolchain install step --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index adfaf9b..50dede3 100644 --- a/action.yml +++ b/action.yml @@ -179,6 +179,10 @@ runs: # rustup toolchain install is the new explicit way # https://github.com/rust-lang/rustup/issues/3635#issuecomment-2343511297 rustup show active-toolchain || rustup toolchain install + if ! rustup default &>/dev/null; then + TOOLCHAIN=$(rustup show active-toolchain 2>/dev/null | awk '{print $1}' | sed 's/-.*//') + [[ -n "$TOOLCHAIN" ]] && rustup default "$TOOLCHAIN" || rustup default stable + fi if [[ -n $components ]]; then rustup component add ${components//,/ } fi