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::command::CommandExt;
|
||||||
use crate::execution_context::ExecutionContext;
|
use crate::execution_context::ExecutionContext;
|
||||||
use crate::terminal::print_separator;
|
use crate::terminal::{print_separator, print_warning};
|
||||||
use crate::utils::{require, which};
|
use crate::utils::{require, which};
|
||||||
use crate::{error::SkipStep, steps::git::RepoStep};
|
use crate::{error::SkipStep, steps::git::RepoStep};
|
||||||
use crate::{powershell, Step};
|
use crate::{powershell, Step};
|
||||||
@@ -201,15 +201,16 @@ pub fn run_wsl_topgrade(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
pub fn windows_update(ctx: &ExecutionContext) -> Result<()> {
|
pub fn windows_update(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let powershell = powershell::Powershell::windows_powershell();
|
let powershell = powershell::Powershell::windows_powershell();
|
||||||
|
|
||||||
|
print_separator("Windows Update");
|
||||||
|
|
||||||
if powershell.supports_windows_update() {
|
if powershell.supports_windows_update() {
|
||||||
print_separator("Windows Update");
|
|
||||||
powershell.windows_update(ctx)
|
powershell.windows_update(ctx)
|
||||||
} else {
|
} else {
|
||||||
Err(SkipStep(
|
print_warning(
|
||||||
"Consider installing PSWindowsUpdate as the use of Windows Update via usoclient is not supported."
|
"Consider installing PSWindowsUpdate as the use of Windows Update via USOClient is not supported.",
|
||||||
.to_string(),
|
);
|
||||||
)
|
|
||||||
.into())
|
Err(SkipStep("USOClient not supported.".to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user