Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Commit 8f64285

Browse files
Also validate $? for $lastexitcode
Resolves #52
1 parent ba8e572 commit 8f64285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oh-my-posh.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Set-Prompt {
1212
Import-Module $sl.CurrentThemeLocation -Force
1313

1414
[ScriptBlock]$Prompt = {
15-
$lastCommandFailed = $global:error.Count -gt $sl.ErrorCount
15+
$lastCommandFailed = ($global:error.Count -gt $sl.ErrorCount) -or -not $?
1616
$sl.ErrorCount = $global:error.Count
1717

1818
#Start the vanilla posh-git when in a vanilla window, else: go nuts

0 commit comments

Comments
 (0)