Skip to content

Commit

Permalink
feat: support LURE (topgrade-rs#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored Aug 15, 2023
1 parent 48ae4bf commit dc78b00
Show file tree
Hide file tree
Showing 3 changed files with 18 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 @@ -143,6 +143,7 @@ pub enum Step {
Kakoune,
Helix,
Krew,
Lure,
Macports,
Mamba,
Miktex,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ fn run() -> Result<()> {
runner.execute(Step::BrewFormula, "Brew", || {
unix::run_brew_formula(&ctx, unix::BrewVariant::Path)
})?;
runner.execute(Step::Lure, "LURE", || linux::run_lure_update(&ctx))?;
}

#[cfg(target_os = "macos")]
Expand Down
16 changes: 16 additions & 0 deletions src/steps/os/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,22 @@ pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {
Ok(())
}

pub fn run_lure_update(ctx: &ExecutionContext) -> Result<()> {
let lure = require("lure")?;

print_separator("LURE");

let mut exe = ctx.run_type().execute(lure);

if ctx.config().yes(Step::Lure) {
exe.args(["-i=false", "up"]);
} else {
exe.arg("up");
}

exe.status_checked()
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit dc78b00

Please sign in to comment.