No need to run self-update in Rustup (#403)

This commit is contained in:
Roey Darwish Dror
2023-04-05 15:42:47 +03:00
committed by GitHub
parent ddb1a021bb
commit 3dd11f7b52
2 changed files with 3 additions and 8 deletions

View File

@@ -206,16 +206,11 @@ pub fn run_apm(run_type: RunType) -> Result<()> {
.status_checked()
}
pub fn run_rustup(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
pub fn run_rustup(ctx: &ExecutionContext) -> Result<()> {
let rustup = utils::require("rustup")?;
print_separator("rustup");
if rustup.canonicalize()?.is_descendant_of(base_dirs.home_dir()) {
run_type.execute(&rustup).args(["self", "update"]).status_checked()?;
}
run_type.execute(&rustup).arg("update").status_checked()
ctx.run_type().execute(rustup).arg("update").status_checked()
}
pub fn run_juliaup(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {