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.
This commit is contained in:
committed by
GitHub
parent
fc83c5a4e4
commit
e2cc0a8547
@@ -243,7 +243,7 @@ fn upgrade_redhat(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
|
|
||||||
if let Some(sudo) = &ctx.sudo() {
|
if let Some(sudo) = &ctx.sudo() {
|
||||||
let mut command = ctx.run_type().execute(&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");
|
command.arg(dnf).arg("distro-sync");
|
||||||
} else {
|
} else {
|
||||||
command.args(&["/usr/bin/yum", "upgrade"]);
|
command.args(&["/usr/bin/yum", "upgrade"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user