Dry run (fixes #22)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
use super::executor::Executor;
|
||||
use super::terminal::Terminal;
|
||||
use super::utils::Check;
|
||||
use failure;
|
||||
use std::process::Command;
|
||||
|
||||
#[must_use]
|
||||
pub fn upgrade_macos(terminal: &mut Terminal) -> Option<(&'static str, bool)> {
|
||||
pub fn upgrade_macos(terminal: &mut Terminal, dry_run: bool) -> Option<(&'static str, bool)> {
|
||||
terminal.print_separator("App Store");
|
||||
|
||||
let success = || -> Result<(), failure::Error> {
|
||||
Command::new("softwareupdate")
|
||||
Executor::new("softwareupdate", dry_run)
|
||||
.args(&["--install", "--all"])
|
||||
.spawn()?
|
||||
.wait()?
|
||||
|
||||
Reference in New Issue
Block a user