From 4e43e18d8a17ad5c84384d4fbb1c9b2f7f0c0236 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 7 Sep 2020 16:55:01 +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 b5ab964..7771b87 100644 --- a/pester-extensions.psm1 +++ b/pester-extensions.psm1 @@ -12,11 +12,7 @@ function Get-CommandResult { [switch] $Multiline ) # 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" - } + $output = & bash -c "$Command 2>&1" $exitCode = $LASTEXITCODE return @{