131: Add a flag for disabling Powershell r=r-darwish a=r-darwish

bors r+

Co-authored-by: Roey Darwish Dror <roey.ghost@gmail.com>
This commit is contained in:
bors[bot]
2019-02-27 07:53:03 +00:00
2 changed files with 7 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ lazy_static! {
m.insert("emacs", Step::Emacs); m.insert("emacs", Step::Emacs);
m.insert("gem", Step::Gem); m.insert("gem", Step::Gem);
#[cfg(windows)]
m.insert("powershell", Step::Powershell);
m m
}; };
} }

View File

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