Add check_run()

This commit is contained in:
Roey Darwish Dror
2018-12-31 22:00:34 +02:00
parent a404df9c97
commit f3f8f322d8
11 changed files with 71 additions and 215 deletions

View File

@@ -1,7 +1,6 @@
use crate::error::Error;
use crate::executor::RunType;
use crate::terminal::print_separator;
use crate::utils::Check;
#[must_use]
pub fn upgrade_macos(run_type: RunType) -> Option<(&'static str, bool)> {
@@ -11,9 +10,7 @@ pub fn upgrade_macos(run_type: RunType) -> Option<(&'static str, bool)> {
run_type
.execute("softwareupdate")
.args(&["--install", "--all"])
.spawn()?
.wait()?
.check()?;
.check_run()?;
Ok(())
}()
.is_ok();