diff --git a/src/config.rs b/src/config.rs index edd0375b..452a6983 100644 --- a/src/config.rs +++ b/src/config.rs @@ -117,6 +117,7 @@ pub enum Step { Vagrant, Vcpkg, Vim, + Winget, Wsl, Yadm, } diff --git a/src/main.rs b/src/main.rs index a78b3e67..bd94ec7f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -147,6 +147,7 @@ fn run() -> Result<()> { { runner.execute(Step::Chocolatey, "Chocolatey", || windows::run_chocolatey(&ctx))?; runner.execute(Step::Scoop, "Scoop", || windows::run_scoop(config.cleanup(), run_type))?; + runner.execute(Step::Winget, "Winget", || windows::run_winget(&ctx))?; } #[cfg(target_os = "macos")] diff --git a/src/steps/os/windows.rs b/src/steps/os/windows.rs index d69acdc6..850fa90e 100644 --- a/src/steps/os/windows.rs +++ b/src/steps/os/windows.rs @@ -35,6 +35,14 @@ pub fn run_chocolatey(ctx: &ExecutionContext) -> Result<()> { command.check_run() } +pub fn run_winget(ctx: &ExecutionContext) -> Result<()> { + let winget = require("winget")?; + + print_separator("winget"); + + ctx.run_type().execute(&winget).args(&["upgrade", "--all"]).check_run() +} + pub fn run_scoop(cleanup: bool, run_type: RunType) -> Result<()> { let scoop = require("scoop")?;