mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 22:07:25 -08:00
revert(pwsh): check history id instead of command line
this reverts commit e041c23fe1
resolves #2431
This commit is contained in:
parent
82b83d1fa4
commit
a1a20e7c86
|
@ -280,7 +280,7 @@ Example:
|
||||||
$global:Error[0] | Where-Object { $_ -ne $null } | Select-Object -ExpandProperty InvocationInfo
|
$global:Error[0] | Where-Object { $_ -ne $null } | Select-Object -ExpandProperty InvocationInfo
|
||||||
} catch { $null }
|
} catch { $null }
|
||||||
# check if the last command caused the last error
|
# check if the last command caused the last error
|
||||||
if ($null -ne $invocationInfo -and $script:LastHistoryId -eq $invocationInfo.HistoryId) {
|
if ($null -ne $invocationInfo -and $lastHistory.CommandLine -eq $invocationInfo.Line) {
|
||||||
$script:ErrorCode = 1
|
$script:ErrorCode = 1
|
||||||
} elseif ($realLASTEXITCODE -is [int] -and $realLASTEXITCODE -ne 0) {
|
} elseif ($realLASTEXITCODE -is [int] -and $realLASTEXITCODE -ne 0) {
|
||||||
# native app exit code
|
# native app exit code
|
||||||
|
|
Loading…
Reference in a new issue