Skip to content

Commit c1a2b8d

Browse files
committed
setup: fix toolchain installation error
`cargo --version` is used to trigger the Rust toolchain installation but does not work currently and fails with the error: "error: toolchain 'nightly-....'is not installed" Use the `rustup toolchain install` instead. Signed-off-by: Yuan Zhuang <yuanz@apache.org>
1 parent ece214b commit c1a2b8d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

setup.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@ else
3535
source "$HOME/.cargo/env"
3636
fi
3737

38-
# Ensure the toolchain, components, and targets we've specified in
39-
# rust-toolchain.toml are ready to go. Since that file sets rustup's default
40-
# toolchain for the entire directory, all we need to do is run any
41-
# rustup-wrapped command to trigger installation. We've arbitrarily chosen
42-
# "cargo --version" since it has no other effect.
43-
cargo --version >/dev/null
38+
# install the Rust toolchain set in rust-toolchain.toml
39+
rustup toolchain install
4440

4541
##########################################
4642
# install toolchain

0 commit comments

Comments
 (0)