diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index 3d29fcc8..8821b2b4 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -266,7 +266,8 @@ Example: return } # see https://github.com/JanDeDobbeleer/oh-my-posh/issues/2483#issuecomment-1175761456 - if ((Get-PSCallStack).Location[0] -ne "") { + # and https://github.com/JanDeDobbeleer/oh-my-posh/issues/2502#issuecomment-1179968052 + if (-not ((Get-PSCallStack).Location -join "").StartsWith("<")) { @(Start-Utf8Process $script:OMPExecutable @("print", "debug", "--pwd=$cleanPWD", "--pswd=$cleanPSWD", "--config=$env:POSH_THEME", "--shell=::SHELL::")) -join "`n" return }