Skip to content

Commit

Permalink
fix: empty error code handling in docs and module
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfspiritM authored and JanDeDobbeleer committed Nov 26, 2020
1 parent 757c835 commit 991ce4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/installation.mdx
Expand Up @@ -195,7 +195,7 @@ Edit `$PROFILE` in your preferred PowerShell version and add the following lines
$errorCode = 0
if ($lastCommandSuccess -eq $false) {
#native app exit code
if ($realLASTEXITCODE -ne 0) {
if ($realLASTEXITCODE -is [int]) {
$errorCode = $realLASTEXITCODE
}
else {
Expand Down
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 -ne 0) {
if ($realLASTEXITCODE -is [int]) {
$errorCode = $realLASTEXITCODE
}
else {
Expand Down

0 comments on commit 991ce4b

Please sign in to comment.