Fix/winget (#670)

* cargo update

* Remove the check for 'winget_enable' set to 'true'. On my Windows 10 and 11 machines, there are no issues with Winget anymore. As far as I remember, it was disabled by default because it was buggy back then.

* remove print_warning

* Revert "cargo update"

This reverts commit 5f4e532bc1.

* Removed the `enable_winget = true` configuration as winget is now enabled by default.

* Removed the #[cfg(windows)] flag.

* Revised as Recommended

* Wrapping at 80
This commit is contained in:
Nils
2024-02-03 02:09:47 +01:00
committed by GitHub
parent 3c970063a9
commit 7007e76ab5
4 changed files with 5 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ use tracing::debug;
use crate::command::CommandExt;
use crate::execution_context::ExecutionContext;
use crate::terminal::{print_separator, print_warning};
use crate::terminal::print_separator;
use crate::utils::{require, which};
use crate::{error::SkipStep, steps::git::Repositories};
use crate::{powershell, Step};
@@ -42,11 +42,6 @@ pub fn run_winget(ctx: &ExecutionContext) -> Result<()> {
print_separator("winget");
if !ctx.config().enable_winget() {
print_warning("Winget is disabled by default. Enable it by setting enable_winget=true in the [windows] section in the configuration.");
return Err(SkipStep(String::from("Winget is disabled by default")).into());
}
ctx.run_type()
.execute(winget)
.args(["upgrade", "--all"])