diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 072b6aca..7cf9da6b 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -156,14 +156,17 @@ fn upgrade_arch_linux(ctx: &ExecutionContext) -> Result<()> { }; debug!("Running Arch update with path: {:?}", path); - if let Some(yay) = which("yay").or_else(|| which("paru")) { + let yay = which("yay"); + if let Some(yay) = &yay { run_type .execute(&yay) .arg("-Pw") .spawn() .and_then(|mut p| p.wait()) .ok(); + } + if let Some(yay) = yay.or_else(|| which("paru")) { let mut command = run_type.execute(&yay); command