Add a flag for disabling Powershell

This commit is contained in:
Roey Darwish Dror
2019-02-27 09:47:20 +02:00
parent 5e6ee87df7
commit da25634c18
2 changed files with 7 additions and 1 deletions

View File

@@ -131,9 +131,12 @@ fn run() -> Result<(), Error> {
#[cfg(windows)]
let powershell = windows::Powershell::new();
#[cfg(windows)]
let should_run_powershell = powershell.profile().is_some() && config.should_run(Step::Powershell);
#[cfg(windows)]
{
if powershell.profile().is_some() && config.should_run(Step::Powershell) {
if should_run_powershell {
execute(
&mut report,
"Powershell Modules Update",