fix: set toolchain
This commit is contained in:
parent
d5be0f0688
commit
032ed83fb4
@ -100,9 +100,10 @@ install-rust() {
|
|||||||
if [[ -z "$(ls "${RUSTUP_HOME}/toolchains" >/dev/null)" ]]; then
|
if [[ -z "$(ls "${RUSTUP_HOME}/toolchains" >/dev/null)" ]]; then
|
||||||
log "info" "No toolchain found, installing a ${GREEN}Rust${RESET_BOLD} toolchain"
|
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}"
|
log "info" "Setting ${GREEN}Rust${RESET_BOLD}'s toolchain to ${GREEN}stable${RESET_BOLD}"
|
||||||
(
|
if ! rustup default stable; then
|
||||||
printf "%s" "${install_path}/cargo/bin/rustup default stable" | zsh
|
log "error" "Failed to set a ${GREEN}Rust${RESET_BOLD} toolchain"
|
||||||
)
|
return 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "info" "${GREEN}Rust${RESET_BOLD} toolchain found, skipping toolchain setup"
|
log "info" "${GREEN}Rust${RESET_BOLD} toolchain found, skipping toolchain setup"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user