diff --git a/scripts/dev_setup.sh b/scripts/dev_setup.sh index 84763fa616aed3..47dfe3a8ab2d4a 100755 --- a/scripts/dev_setup.sh +++ b/scripts/dev_setup.sh @@ -461,16 +461,17 @@ function install_toolchain { } function install_rustup_components_and_nightly { + echo "Updating rustup and installing the latest rustc, rustfmt & clippy" + rustup update + rustup toolchain install stable # Install the latest toolchain to ensure that dependencies can always be built (even if aptos-core is behind) + rustup component add rustfmt + rustup component add clippy + echo "Printing the rustup version and toolchain list" rustup --version rustup show rustup toolchain list -v - echo "Updating rustup and installing rustfmt & clippy" - rustup update - rustup component add rustfmt - rustup component add clippy - # We require nightly for strict rust formatting echo "Installing the nightly toolchain and rustfmt nightly" if ! rustup toolchain install nightly; then