From e2cc0a8547926f7e58c81b211dde2ac9ba47fc3c Mon Sep 17 00:00:00 2001 From: Marcelo dos Santos Mafra Date: Wed, 16 Dec 2020 04:24:47 -0300 Subject: [PATCH] Use DNF-3 in fedora `/usr/bin/dnf` is a symlink to `/usr/bin/dnf-3` in the latest Fedora and CentOS 8. CentOS 7 doesn't have DNF at all. --- src/steps/os/linux.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 5c1e23cd..e7cf41e7 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -243,7 +243,7 @@ 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").if_exists() { + 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"]);