Don't pass dry_run as a boolean to functions

This commit is contained in:
Roey Darwish Dror
2018-12-31 13:26:17 +02:00
parent 23ae157c72
commit 957d73c634
13 changed files with 257 additions and 196 deletions

View File

@@ -4,11 +4,11 @@ use crate::terminal::print_separator;
use crate::utils::Check;
#[must_use]
pub fn upgrade_macos(dry_run: bool) -> Option<(&'static str, bool)> {
pub fn upgrade_macos(run_type: RunType) -> Option<(&'static str, bool)> {
print_separator("App Store");
let success = || -> Result<(), Error> {
Executor::new("softwareupdate", dry_run)
run_type.execute("softwareupdate")
.args(&["--install", "--all"])
.spawn()?
.wait()?