Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/steps/os/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ pub fn upgrade_macos(ctx: &ExecutionContext) -> Result<()> {
}
}

let mut command = ctx.run_type().execute("softwareupdate");
command.args(["--install", "--all"]);
// We don't know what the proper command to use here cause the macOS man
// page is poor.
//
// man: https://keith.github.io/xcode-man-pages/softwareupdate.8.html
// issue: https://github.com/topgrade-rs/topgrade/issues/546
let sudo = require_option(ctx.sudo().as_ref(), REQUIRE_SUDO.to_string())?;
let mut command = ctx.run_type().execute(sudo);
command.args(["softwareupdate", "--install", "--all", "--restart"]);

if should_ask {
command.arg("--no-scan");
Expand Down