From 9dcd7fffe2d0f65cab189ae86454104acb540be4 Mon Sep 17 00:00:00 2001 From: Nils <52573120+niStee@users.noreply.github.com> Date: Thu, 10 Apr 2025 13:50:35 +0200 Subject: [PATCH] Enhancement: Update Windows Package Manager Indexes (#1085) * fix(windows): update winget sources and upgrade all packages * refactor(windows): streamline winget upgrade command execution --- src/steps/os/windows.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/steps/os/windows.rs b/src/steps/os/windows.rs index 260142d8..d06ec971 100644 --- a/src/steps/os/windows.rs +++ b/src/steps/os/windows.rs @@ -42,12 +42,18 @@ pub fn run_winget(ctx: &ExecutionContext) -> Result<()> { print_separator("winget"); + ctx.run_type() + .execute(&winget) + .args(["source", "update"]) + .status_checked()?; + let mut args = vec!["upgrade", "--all"]; if ctx.config().winget_silent_install() { args.push("--silent"); } - ctx.run_type().execute(winget).args(args).status_checked() + ctx.run_type().execute(&winget).args(args).status_checked()?; + Ok(()) } pub fn run_scoop(ctx: &ExecutionContext) -> Result<()> { @@ -65,7 +71,6 @@ pub fn run_scoop(ctx: &ExecutionContext) -> Result<()> { .args(["cache", "rm", "-a"]) .status_checked()? } - Ok(()) }