Enhancement: Update Windows Package Manager Indexes (#1085)

* fix(windows): update winget sources and upgrade all packages

* refactor(windows): streamline winget upgrade command execution
This commit is contained in:
Nils
2025-04-10 13:50:35 +02:00
committed by GitHub
parent 30b727b138
commit 9dcd7fffe2

View File

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