committed by
GitHub
parent
0ed5f8f96a
commit
76ae636f20
@@ -243,13 +243,11 @@ 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);
|
||||||
command
|
if let Some(dnf) = Path::new("/usr/bin/dnf").if_exists() {
|
||||||
.arg(
|
command.arg(dnf).arg("distro-sync");
|
||||||
Path::new("/usr/bin/dnf")
|
} else {
|
||||||
.if_exists()
|
command.args(&["/usr/bin/yum", "upgrade"]);
|
||||||
.unwrap_or_else(|| Path::new("/usr/bin/yum")),
|
}
|
||||||
)
|
|
||||||
.arg("upgrade");
|
|
||||||
|
|
||||||
if let Some(args) = ctx.config().dnf_arguments() {
|
if let Some(args) = ctx.config().dnf_arguments() {
|
||||||
command.args(args.split_whitespace());
|
command.args(args.split_whitespace());
|
||||||
|
|||||||
Reference in New Issue
Block a user