mirror of
https://github.com/esp-rs/espup.git
synced 2025-09-28 13:20:41 +00:00
fix: ⚡️ Update path when installing rustup
This commit is contained in:
parent
6890cc90f5
commit
b08e3fd3db
@ -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(())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user