feat: support ZVM (#777)

This commit is contained in:
SteveLauC
2024-07-23 07:26:08 +08:00
committed by GitHub
parent fdf40dbf43
commit b8da17106a
3 changed files with 11 additions and 0 deletions

View File

@@ -163,6 +163,7 @@ pub enum Step {
Xcodes,
Yadm,
Yarn,
Zvm,
}
#[derive(Deserialize, Default, Debug, Merge)]

View File

@@ -416,6 +416,7 @@ fn run() -> Result<()> {
generic::run_lensfun_update_data(&ctx)
})?;
runner.execute(Step::Poetry, "Poetry", || generic::run_poetry(&ctx))?;
runner.execute(Step::Zvm, "ZVM", || generic::run_zvm(&ctx))?;
if should_run_powershell {
runner.execute(Step::Powershell, "Powershell Modules Update", || {

View File

@@ -1008,3 +1008,12 @@ pub fn run_poetry(ctx: &ExecutionContext) -> Result<()> {
print_separator("Poetry");
ctx.run_type().execute(poetry).args(["self", "update"]).status_checked()
}
/// Involve `zvm upgrade` to update ZVM
pub fn run_zvm(ctx: &ExecutionContext) -> Result<()> {
let zvm = require("zvm")?;
print_separator("ZVM");
ctx.run_type().execute(zvm).arg("upgrade").status_checked()
}