Skip to content

Commit 22745d4

Browse files
committed
Fixed theme not showing when cache is invalidated.
1 parent 15e2082 commit 22745d4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Microsoft.PowerShell_profile.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,6 +2451,8 @@ if ($isInteractive) {
24512451
}
24522452
}
24532453
if ($localThemePath -and (Test-Path $localThemePath)) {
2454+
# Ensure OMP always uses our theme, even if its internal cache is invalidated
2455+
$env:POSH_THEME = $localThemePath
24542456
# Cache the OMP init script so we don't shell out every startup
24552457
# Header tracks both OMP version AND theme path so a theme switch invalidates the cache.
24562458
# PERF: Defer `oh-my-posh version` (~2-3s) until we know the cache is missing/stale.

0 commit comments

Comments
 (0)