From 6c24440f5278e92a2ac8d6a37bbce3b4e5b04ffd Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 7 Sep 2020 15:26:47 +0300 Subject: [PATCH] fix --- pester-extensions.psm1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pester-extensions.psm1 b/pester-extensions.psm1 index b63c293..5dabffd 100644 --- a/pester-extensions.psm1 +++ b/pester-extensions.psm1 @@ -10,11 +10,7 @@ function Get-CommandResult { [Parameter(Mandatory)][string] $Command ) # CMD trick to suppress and show error output because some commands write to stderr (for example, "python --version") - if ($IsWindows) { - [string[]]$output = & $env:comspec /c "$Command 2>&1" - } else { - $output = & bash -c "$Command 2>&1" - } + [string[]]$output = & $env:comspec /c "$Command 2>&1" $exitCode = $LASTEXITCODE return @{