Always display windows update step (#781)
* always display windows update step * remove extra comma * i guess format wants the comma
This commit is contained in:
@@ -7,7 +7,7 @@ use tracing::debug;
|
||||
|
||||
use crate::command::CommandExt;
|
||||
use crate::execution_context::ExecutionContext;
|
||||
use crate::terminal::print_separator;
|
||||
use crate::terminal::{print_separator, print_warning};
|
||||
use crate::utils::{require, which};
|
||||
use crate::{error::SkipStep, steps::git::RepoStep};
|
||||
use crate::{powershell, Step};
|
||||
@@ -201,15 +201,16 @@ pub fn run_wsl_topgrade(ctx: &ExecutionContext) -> Result<()> {
|
||||
pub fn windows_update(ctx: &ExecutionContext) -> Result<()> {
|
||||
let powershell = powershell::Powershell::windows_powershell();
|
||||
|
||||
if powershell.supports_windows_update() {
|
||||
print_separator("Windows Update");
|
||||
|
||||
if powershell.supports_windows_update() {
|
||||
powershell.windows_update(ctx)
|
||||
} else {
|
||||
Err(SkipStep(
|
||||
"Consider installing PSWindowsUpdate as the use of Windows Update via usoclient is not supported."
|
||||
.to_string(),
|
||||
)
|
||||
.into())
|
||||
print_warning(
|
||||
"Consider installing PSWindowsUpdate as the use of Windows Update via USOClient is not supported.",
|
||||
);
|
||||
|
||||
Err(SkipStep("USOClient not supported.".to_string()).into())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user