[🐛 FIX] ignore EXIT_NOTHING_TO_DO for all fwupdmgr commands (#322)
This commit is contained in:
@@ -403,12 +403,13 @@ pub fn run_fwupdmgr(run_type: RunType) -> Result<()> {
|
||||
|
||||
print_separator("Firmware upgrades");
|
||||
|
||||
run_type.execute(&fwupdmgr).arg("refresh").check_run()?;
|
||||
let exit_status = run_type.execute(&fwupdmgr).arg("get-updates").spawn()?.wait()?;
|
||||
for argument in vec!["refresh", "get-updates"].into_iter() {
|
||||
let exit_status = run_type.execute(&fwupdmgr).arg(argument).spawn()?.wait()?;
|
||||
|
||||
if let ExecutorExitStatus::Wet(e) = exit_status {
|
||||
if !(e.success() || e.code().map(|c| c == 2).unwrap_or(false)) {
|
||||
return Err(TopgradeError::ProcessFailed(e).into());
|
||||
if let ExecutorExitStatus::Wet(e) = exit_status {
|
||||
if !(e.success() || e.code().map(|c| c == 2).unwrap_or(false)) {
|
||||
return Err(TopgradeError::ProcessFailed(e).into());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user