From 193f37b2fab22614258d358786b8750fdfb82109 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 7 Sep 2020 15:23:55 +0300 Subject: [PATCH] update --- pester-extensions.psm1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pester-extensions.psm1 b/pester-extensions.psm1 index 4727655..b63c293 100644 --- a/pester-extensions.psm1 +++ b/pester-extensions.psm1 @@ -7,9 +7,7 @@ Pester extension that allows to run command and validate exit code function Get-CommandResult { Param ( - [Parameter(Mandatory)] - [string] $Command, - [switch] $Multiline + [Parameter(Mandatory)][string] $Command ) # CMD trick to suppress and show error output because some commands write to stderr (for example, "python --version") if ($IsWindows) { @@ -20,7 +18,7 @@ function Get-CommandResult { $exitCode = $LASTEXITCODE return @{ - Output = If ($Multiline -eq $true) { $output } else { [string]$output } + Output = $output ExitCode = $exitCode } }