feat: handle missing toolchains
This commit is contained in:
parent
cb6f368c94
commit
0a9854e304
@ -102,7 +102,13 @@ install-rust() {
|
|||||||
fi
|
fi
|
||||||
export PATH="${PATH}:${install_path}/cargo/bin"
|
export PATH="${PATH}:${install_path}/cargo/bin"
|
||||||
|
|
||||||
rustup default stable
|
if [[ -z "$(ls "${RUSTUP_HOME}/toolchains")" ]]; then
|
||||||
|
log "info" "No toolchain found, installing a ${GREEN}Rust${RESET_BOLD} toolchain"
|
||||||
|
log "info" "Setting ${GREEN}Rust{$RESET_BOLD}'s toolchain to ${GREEN}stable${RESET_BOLD}"
|
||||||
|
rustup default stable
|
||||||
|
else
|
||||||
|
log "info" "${GREEN}Rust${RESET_BOLD} toolchain found, skipping toolchain setup"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install-cargo-binary() {
|
install-cargo-binary() {
|
||||||
|
Loading…
Reference in New Issue
Block a user