mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 03:13:23 +00:00
fixed naming
This commit is contained in:
@@ -13,14 +13,14 @@ function Get-CommandResult {
|
|||||||
)
|
)
|
||||||
# CMD and bash trick to suppress and show error output because some commands write to stderr (for example, "python --version")
|
# CMD and bash trick to suppress and show error output because some commands write to stderr (for example, "python --version")
|
||||||
If ($IsWindows) {
|
If ($IsWindows) {
|
||||||
$output = & $env:comspec /c "$Command 2>&1"
|
$stdout = & $env:comspec /c "$Command 2>&1"
|
||||||
} else {
|
} else {
|
||||||
$output = & bash -c "$Command 2>&1"
|
$stdout = & bash -c "$Command 2>&1"
|
||||||
}
|
}
|
||||||
$exitCode = $LASTEXITCODE
|
$exitCode = $LASTEXITCODE
|
||||||
|
|
||||||
return @{
|
return @{
|
||||||
Output = If ($Multiline -eq $true) { $output } else { [string]$output }
|
Output = If ($Multiline -eq $true) { $stdout } else { [string]$stdout }
|
||||||
ExitCode = $exitCode
|
ExitCode = $exitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user