mirror of
https://github.com/actions/runner-images.git
synced 2026-01-09 20:23:52 +08:00
[macos] check exit code in Invoke-SSHPassCommand (#8156)
This commit is contained in:
@@ -67,7 +67,7 @@ function Invoke-AnkaCommand {
|
||||
[string] $Command
|
||||
)
|
||||
|
||||
$result = bash -c "$Command 2>&1" | Out-String
|
||||
$result = bash -c "$Command 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "There is an error during command execution:`n$result"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user