[macos] check exit code in Invoke-SSHPassCommand (#8156)

This commit is contained in:
ilia-shipitsin
2023-08-25 11:29:01 +02:00
committed by GitHub
parent b21ec054ff
commit a4f3c433b4
3 changed files with 13 additions and 3 deletions

View File

@@ -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