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

Commit

Permalink
Also validate $? for $lastexitcode
Browse files Browse the repository at this point in the history
Resolves #52
  • Loading branch information
JanDeDobbeleer committed Feb 1, 2020
1 parent ba8e572 commit 8f64285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oh-my-posh.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Set-Prompt {
Import-Module $sl.CurrentThemeLocation -Force

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

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

0 comments on commit 8f64285

Please sign in to comment.