Launch fwupdmgr (fix #4)

This commit is contained in:
Roey Darwish Dror
2018-06-03 16:12:16 +03:00
parent 4daac1b857
commit 8de74a64d4
2 changed files with 10 additions and 0 deletions

View File

@@ -193,6 +193,15 @@ fn run() -> Result<()> {
_ => (),
}
if let Ok(fwupdmgr) = which("fwupdmgr") {
terminal.print_separator("Firmware upgrades");
Command::new(&fwupdmgr)
.arg("refresh")
.spawn()?
.wait()?
.and_then(|| Command::new(&fwupdmgr).arg("get-updates").spawn()?.wait())?;
}
if let Ok(sudo) = &sudo {
if let Ok(needrestart) = which("needrestart") {
terminal.print_separator("Check for needed restarts");