pull/15/head
Nikita Bykov 5 years ago
parent 193f37b2fa
commit 6c24440f52

@ -10,11 +10,7 @@ function Get-CommandResult {
[Parameter(Mandatory)][string] $Command [Parameter(Mandatory)][string] $Command
) )
# CMD trick to suppress and show error output because some commands write to stderr (for example, "python --version") # 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"
[string[]]$output = & $env:comspec /c "$Command 2>&1"
} else {
$output = & bash -c "$Command 2>&1"
}
$exitCode = $LASTEXITCODE $exitCode = $LASTEXITCODE
return @{ return @{

Loading…
Cancel
Save