Make ConfigUpdate an individual step (fix #843)

This commit is contained in:
Roey Darwish Dror
2022-01-26 22:52:52 +02:00
parent 5f4dd33f1f
commit 5e7453b387
3 changed files with 3 additions and 2 deletions

View File

@@ -77,6 +77,7 @@ pub enum Step {
Choosenim, Choosenim,
Composer, Composer,
Conda, Conda,
ConfigUpdate,
CustomCommands, CustomCommands,
Deno, Deno,
Dotnet, Dotnet,

View File

@@ -135,7 +135,7 @@ fn run() -> Result<()> {
println!("Error detecting current distribution: {}", e); 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", || { runner.execute(Step::BrewFormula, "Brew", || {
unix::run_brew_formula(&ctx, unix::BrewVariant::Linux) unix::run_brew_formula(&ctx, unix::BrewVariant::Linux)

View File

@@ -535,7 +535,7 @@ pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()
pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> { pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {
let sudo = require_option(ctx.sudo().as_ref(), String::from("sudo is not installed"))?; 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()); return Err(SkipStep("Skipped in --yes".to_string()).into());
} }