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(()) }