Add support for Lean 4's elan (#742)

This commit is contained in:
Alok Singh
2024-03-15 18:35:47 -07:00
committed by GitHub
parent 2c1ce3d4e6
commit 9518f43866
3 changed files with 13 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ pub enum Step {
Distrobox,
DkpPacman,
Dotnet,
Elan,
Emacs,
Firmware,
Flatpak,

View File

@@ -342,6 +342,7 @@ fn run() -> Result<()> {
// The following update function should be executed on all OSes.
runner.execute(Step::Fossil, "fossil", || generic::run_fossil(&ctx))?;
runner.execute(Step::Elan, "elan", || generic::run_elan(&ctx))?;
runner.execute(Step::Rustup, "rustup", || generic::run_rustup(&ctx))?;
runner.execute(Step::Juliaup, "juliaup", || generic::run_juliaup(&ctx))?;
runner.execute(Step::Dotnet, ".NET", || generic::run_dotnet_upgrade(&ctx))?;

View File

@@ -227,6 +227,17 @@ pub fn run_rustup(ctx: &ExecutionContext) -> Result<()> {
ctx.run_type().execute(rustup).arg("update").status_checked()
}
pub fn run_elan(ctx: &ExecutionContext) -> Result<()> {
let elan = require("elan")?;
print_separator("elan");
ctx.run_type()
.execute(&elan)
.args(["self", "update"])
.status_checked()?;
ctx.run_type().execute(&elan).arg("update").status_checked()
}
pub fn run_juliaup(ctx: &ExecutionContext) -> Result<()> {
let juliaup = require("juliaup")?;