Skip to content

Commit

Permalink
fix: ignore error code 0 for non-native errors
Browse files Browse the repository at this point in the history
resolves #207
  • Loading branch information
JanDeDobbeleer committed Dec 2, 2020
1 parent 7d3629c commit bd4d563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/powershell/oh-my-posh/oh-my-posh.psm1
Expand Up @@ -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 {
Expand Down

0 comments on commit bd4d563

Please sign in to comment.