Only update Powershell modules if profile is present and allow disabling this step (fix #114)

This commit is contained in:
Roey Darwish Dror
2019-01-27 20:15:59 +02:00
parent df27021277
commit 4f981fd504
3 changed files with 23 additions and 18 deletions

View File

@@ -96,7 +96,11 @@ fn run() -> Result<(), Error> {
let powershell = windows::Powershell::new();
#[cfg(windows)]
report.push_result(execute(|| powershell.update_modules(run_type), opt.no_retry)?);
{
if powershell.profile().is_some() && !opt.disable.contains(&Step::Powershell) {
report.push_result(execute(|| powershell.update_modules(run_type), opt.no_retry)?);
}
}
#[cfg(target_os = "linux")]
let distribution = linux::Distribution::detect();