From 8c771d25940cc624f8ef53204356d115e2b19145 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Mon, 21 Dec 2020 09:45:28 +0200 Subject: [PATCH] Revert "Use distro-sync in dnf (fix #576) (#579)" (fix #587) This reverts commit 76ae636f202e5e2386d1e96235e99b6bbbc510f3. --- src/steps/os/linux.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index e7cf41e7..90906e81 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -243,11 +243,13 @@ fn upgrade_redhat(ctx: &ExecutionContext) -> Result<()> { if let Some(sudo) = &ctx.sudo() { let mut command = ctx.run_type().execute(&sudo); - if let Some(dnf) = Path::new("/usr/bin/dnf-3").if_exists() { - command.arg(dnf).arg("distro-sync"); - } else { - command.args(&["/usr/bin/yum", "upgrade"]); - } + command + .arg( + Path::new("/usr/bin/dnf-3") + .if_exists() + .unwrap_or_else(|| Path::new("/usr/bin/yum")), + ) + .arg("upgrade"); if let Some(args) = ctx.config().dnf_arguments() { command.args(args.split_whitespace());