From a7cc77ca13c61200f401dcdbfb1d3f7dd7fe99cf Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Sun, 16 Feb 2020 11:39:32 +0200 Subject: [PATCH] =?UTF-8?q?[=F0=9F=90=9B=20FIX]=20ignore=20EXIT=5FNOTHING?= =?UTF-8?q?=5FTO=5FDO=20for=20all=20fwupdmgr=20commands=20(#322)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/steps/os/linux.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index b1ccc1fe..4acfcfb7 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -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()); + } } }