Add support for Fedora Silverblue (#312)

This commit is contained in:
Kyle Finlay
2020-01-31 00:27:57 +11:00
committed by GitHub
parent d74c4574a3
commit 02692bd5e1

View File

@@ -200,11 +200,11 @@ fn upgrade_redhat(sudo: &Option<PathBuf>, run_type: RunType, yes: bool) -> Resul
if let Some(sudo) = &sudo { if let Some(sudo) = &sudo {
let mut command = run_type.execute(&sudo); let mut command = run_type.execute(&sudo);
command command
.arg( .arg(Path::new("/usr/bin/dnf").if_exists().unwrap_or_else(|| {
Path::new("/usr/bin/dnf") Path::new("/usr/bin/yum")
.if_exists() .if_exists()
.unwrap_or_else(|| Path::new("/usr/bin/yum")), .unwrap_or_else(|| Path::new("/usr/bin/rpm-ostree"))
) }))
.arg("upgrade"); .arg("upgrade");
if yes { if yes {
command.arg("-y"); command.arg("-y");