fix: ️ Update path when installing rustup

This commit is contained in:
Sergio Gasquez 2022-09-29 14:55:12 +00:00
parent 6890cc90f5
commit b08e3fd3db

View File

@ -357,6 +357,16 @@ fn install_rustup(nightly_version: &str) -> Result<()> {
"-y"
)
.run()?;
#[cfg(windows)]
let path = format!("{};{}", std::env::var("PATH").unwrap(), get_cargo_home().join("bin").display());
#[cfg(unix)]
let path = format!("{}:{}", std::env::var("PATH").unwrap(), get_cargo_home().join("bin").display());
std::env::set_var("PATH", path.clone());
warn!("{} Please restart your terminal after the installation for the changes to take effect.", emoji::WARN);
Ok(())
}