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:
@@ -42,12 +42,18 @@ pub fn run_winget(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
|
|
||||||
print_separator("winget");
|
print_separator("winget");
|
||||||
|
|
||||||
|
ctx.run_type()
|
||||||
|
.execute(&winget)
|
||||||
|
.args(["source", "update"])
|
||||||
|
.status_checked()?;
|
||||||
|
|
||||||
let mut args = vec!["upgrade", "--all"];
|
let mut args = vec!["upgrade", "--all"];
|
||||||
if ctx.config().winget_silent_install() {
|
if ctx.config().winget_silent_install() {
|
||||||
args.push("--silent");
|
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<()> {
|
pub fn run_scoop(ctx: &ExecutionContext) -> Result<()> {
|
||||||
@@ -65,7 +71,6 @@ pub fn run_scoop(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
.args(["cache", "rm", "-a"])
|
.args(["cache", "rm", "-a"])
|
||||||
.status_checked()?
|
.status_checked()?
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user