Skip to content

Commit

Permalink
feat: support ZVM
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Jul 20, 2024
1 parent cbc5fc9 commit 8c8bc59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ pub enum Step {
Xcodes,
Yadm,
Yarn,
Zvm,
}

#[derive(Deserialize, Default, Debug, Merge)]
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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", || {
Expand Down
9 changes: 9 additions & 0 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit 8c8bc59

Please sign in to comment.