Modules refactor

This commit is contained in:
Roey Darwish Dror
2018-12-15 21:52:21 +02:00
parent 66c6338b42
commit 47a271af47
14 changed files with 63 additions and 61 deletions

21
src/steps/os/macos.rs Normal file
View File

@@ -0,0 +1,21 @@
use crate::error::Error;
use crate::executor::Executor;
use crate::terminal::print_separator;
use crate::utils::Check;
#[must_use]
pub fn upgrade_macos(dry_run: bool) -> Option<(&'static str, bool)> {
print_separator("App Store");
let success = || -> Result<(), Error> {
Executor::new("softwareupdate", dry_run)
.args(&["--install", "--all"])
.spawn()?
.wait()?
.check()?;
Ok(())
}()
.is_ok();
Some(("App Store", success))
}