Skip to content

Commit

Permalink
fix(pwsh): expand relevant errors
Browse files Browse the repository at this point in the history
resolves #6149
  • Loading branch information
JanDeDobbeleer committed Feb 27, 2025
1 parent b4ac5e2 commit 65ec86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shell/scripts/omp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {

$invocationInfo = try {
# retrieve info of the most recent error
$global:Error[0] | Where-Object { $_ -ne $null } | Select-Object -ExpandProperty InvocationInfo
$global:Error | Where-Object { $_.GetType().Name -eq 'ErrorRecord' } | Select-Object -First 1 -ExpandProperty InvocationInfo
}
catch { $null }

Expand Down

0 comments on commit 65ec86b

Please sign in to comment.