Skip to content

Commit

Permalink
Make toolchain install more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed Sep 19, 2024
1 parent eb4a655 commit 86a2ce6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Add new parameter `cache-directories` that is propagated to `Swatinem/rust-cache` (#44 by @pranc1ngpegasus)
* Add new parameter `cache-key` that is propagated to `Swatinem/rust-cache` as `key` (#41 by @iainlane)
* Make rustup toolchain installation more robust in light of planned changes https://github.com/rust-lang/rustup/issues/3635 and https://github.com/rust-lang/rustup/pull/3985

## [1.9.0] - 2024-06-08

Expand Down
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ runs:
if [[ -z "$toolchain" && ( -f "rust-toolchain" || -f "rust-toolchain.toml" ) ]]
then
# Install the toolchain as specified in the file
# Might break at some point: https://github.com/rust-lang/rustup/issues/1397
rustup show
# rustup show is the old way that implicitly installed a toolchain
# 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 [[ -n $components ]]; then
rustup component add ${components//,/ }
fi
Expand Down

0 comments on commit 86a2ce6

Please sign in to comment.