added silent install option for winget (#1089)
* added silent install option for winget * corrected formatting issues. * Update src/steps/os/windows.rs Remove code duplication. Co-authored-by: SteveLauC <stevelauc@outlook.com> --------- Co-authored-by: SteveLauC <stevelauc@outlook.com>
This commit is contained in:
@@ -42,10 +42,12 @@ pub fn run_winget(ctx: &ExecutionContext) -> Result<()> {
|
||||
|
||||
print_separator("winget");
|
||||
|
||||
ctx.run_type()
|
||||
.execute(winget)
|
||||
.args(["upgrade", "--all"])
|
||||
.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()
|
||||
}
|
||||
|
||||
pub fn run_scoop(ctx: &ExecutionContext) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user