Microsoft update for macOS (fix #344)
This commit is contained in:
committed by
GitHub
parent
20a923a9c0
commit
2b89f87a37
@@ -363,6 +363,7 @@ fn run() -> Result<()> {
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
if config.should_run(Step::System) {
|
||||
runner.execute("Microsoft AutoUpdate", || macos::run_msupdate(&ctx))?;
|
||||
runner.execute("App Store", || macos::run_mas(run_type))?;
|
||||
runner.execute("System upgrade", || macos::upgrade_macos(run_type))?;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
use crate::execution_context::ExecutionContext;
|
||||
use crate::executor::RunType;
|
||||
use crate::terminal::print_separator;
|
||||
use crate::utils::require;
|
||||
use crate::utils::{require, PathExt};
|
||||
use anyhow::Result;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn run_msupdate(ctx: &ExecutionContext) -> Result<()> {
|
||||
let msupdate =
|
||||
Path::new("/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate")
|
||||
.require()?;
|
||||
print_separator("Microsoft AutoUpdate");
|
||||
|
||||
ctx.run_type().execute(msupdate).arg("--list").check_run()?;
|
||||
ctx.run_type().execute(msupdate).arg("--install").check_run()
|
||||
}
|
||||
|
||||
pub fn run_mas(run_type: RunType) -> Result<()> {
|
||||
let mas = require("mas")?;
|
||||
|
||||
Reference in New Issue
Block a user