From 5e7453b387fcc39cffc9acda127a1be533feeed9 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Wed, 26 Jan 2022 22:52:52 +0200 Subject: [PATCH] Make ConfigUpdate an individual step (fix #843) --- src/config.rs | 1 + src/main.rs | 2 +- src/steps/os/linux.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 9afec0b1..05d3622b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -77,6 +77,7 @@ pub enum Step { Choosenim, Composer, Conda, + ConfigUpdate, CustomCommands, Deno, Dotnet, diff --git a/src/main.rs b/src/main.rs index a1f5f7c3..c0f72796 100644 --- a/src/main.rs +++ b/src/main.rs @@ -135,7 +135,7 @@ fn run() -> Result<()> { println!("Error detecting current distribution: {}", e); } } - runner.execute(Step::System, "config-update", || linux::run_config_update(&ctx))?; + runner.execute(Step::ConfigUpdate, "config-update", || linux::run_config_update(&ctx))?; runner.execute(Step::BrewFormula, "Brew", || { unix::run_brew_formula(&ctx, unix::BrewVariant::Linux) diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 4c176eba..774bf69d 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -535,7 +535,7 @@ pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<() pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> { let sudo = require_option(ctx.sudo().as_ref(), String::from("sudo is not installed"))?; - if ctx.config().yes(Step::System) { + if ctx.config().yes(Step::ConfigUpdate) { return Err(SkipStep("Skipped in --yes".to_string()).into()); }