Skip to content

Commit

Permalink
update self update skip to skip only for windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfraem committed May 8, 2024
1 parent a4b79b2 commit aa1d066
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/actions/rust/rust-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,29 @@ runs:
# self update is currently broken on Windows runners:
# https://github.com/rust-lang/rustup/issues/3709
# if ! rustup self update; then
# echo "rustup self update failed"
# fi
# so we'll skip self update for windows
OS=${{ inputs.os }}
IS_WINDOWS=false; [[ $OS =~ ^[wW]indows ]] && IS_WINDOWS=true
if [[ $IS_WINDOWS = true ]] ;
then
echo "skipping self update on windows runner due to https://github.com/rust-lang/rustup/issues/3709"
elif ! rustup self update; then
echo "rustup self update failed"
fi
TARGET=${{ inputs.target }}
if [[ $TARGET != '' ]]; then
rustup target add $TARGET
fi
# self update is currently broken on Windows runners:
# https://github.com/rust-lang/rustup/issues/3709
# rustup update
rustup update --no-self-update
if [[ $IS_WINDOWS = true ]] ;
then
echo "skipping self update on windows runner due to https://github.com/rust-lang/rustup/issues/3709"
rustup update --no-self-update
else
rustup update
fi
TOOLCHAIN=${{ inputs.toolchain }}
if [[ $TOOLCHAIN != 'stable' ]]; then
Expand Down

0 comments on commit aa1d066

Please sign in to comment.