Windows Update (fix #37)
This commit is contained in:
21
src/main.rs
21
src/main.rs
@@ -98,14 +98,16 @@ fn run() -> Result<(), Error> {
|
||||
#[cfg(windows)]
|
||||
report(&mut reports, powershell.update_modules(&mut terminal));
|
||||
|
||||
if !(matches.is_present("no_system")) {
|
||||
#[cfg(target_os = "linux")]
|
||||
report(&mut reports, linux::upgrade(&sudo, &mut terminal));
|
||||
|
||||
#[cfg(windows)]
|
||||
report(&mut reports, windows::run_chocolatey(&mut terminal));
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if !(matches.is_present("no_system")) {
|
||||
report(&mut reports, linux::upgrade(&sudo, &mut terminal));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
report(&mut reports, windows::run_chocolatey(&mut terminal));
|
||||
|
||||
#[cfg(unix)]
|
||||
report(&mut reports, unix::run_homebrew(&mut terminal));
|
||||
|
||||
@@ -178,6 +180,13 @@ fn run() -> Result<(), Error> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
if !(matches.is_present("no_system")) {
|
||||
report(&mut reports, powershell.windows_update(&mut terminal));
|
||||
}
|
||||
}
|
||||
|
||||
if !reports.is_empty() {
|
||||
terminal.print_separator("Summary");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user