fix: ignore error code 0 for non-native errors

resolves #207
This commit is contained in:
Jan De Dobbeleer 2020-12-02 09:49:18 +01:00 committed by Jan De Dobbeleer
parent 7d3629c7d4
commit bd4d563245

View file

@ -64,7 +64,7 @@ function Set-PoshPrompt {
Set-PoshContext
if ($lastCommandSuccess -eq $false) {
#native app exit code
if ($realLASTEXITCODE -is [int]) {
if ($realLASTEXITCODE -is [int] -and $realLASTEXITCODE -gt 0) {
$errorCode = $realLASTEXITCODE
}
else {