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

@@ -355,7 +355,7 @@ For more information about this issue see https://askubuntu.com/questions/110969
)))]
runner.execute(Step::Atom, "apm", || generic::run_apm(run_type))?;
runner.execute(Step::Fossil, "fossil", || generic::run_fossil(run_type))?;
runner.execute(Step::Rustup, "rustup", || generic::run_rustup(&base_dirs, run_type))?;
runner.execute(Step::Rustup, "rustup", || generic::run_rustup(&ctx))?;
runner.execute(Step::Juliaup, "juliaup", || generic::run_juliaup(&base_dirs, run_type))?;
runner.execute(Step::Dotnet, ".NET", || generic::run_dotnet_upgrade(&ctx))?;
runner.execute(Step::Choosenim, "choosenim", || generic::run_choosenim(&ctx))?;

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<()> {