Remove execute legacy

This commit is contained in:
Roey Darwish Dror
2019-03-10 21:48:49 +02:00
parent 12bf4a51f9
commit 1095f46a8a
7 changed files with 86 additions and 135 deletions

View File

@@ -3,17 +3,11 @@ use crate::executor::RunType;
use crate::terminal::print_separator;
#[must_use]
pub fn upgrade_macos(run_type: RunType) -> Option<(&'static str, bool)> {
pub fn upgrade_macos(run_type: RunType) -> Result<(), Error> {
print_separator("App Store");
let success = || -> Result<(), Error> {
run_type
.execute("softwareupdate")
.args(&["--install", "--all"])
.check_run()?;
Ok(())
}()
.is_ok();
Some(("App Store", success))
run_type
.execute("softwareupdate")
.args(&["--install", "--all"])
.check_run()
}