JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
16.8k stars 2.35k forks source link

Strange Font Issue #4468

Closed wekempf closed 10 months ago

wekempf commented 10 months ago

Code of Conduct

What happened?

Suddenly today my prompt isn't displaying nicely. Not sure what the cause is. PowerShell did get updated, but I'm not sure how that would be causing what I'm seeing.

I have a custom prompt, but all themes seem to have issues with nerd font display (I'm using CaskaydiaCove Nerd Font Mono). For example, using the theme pure.

image

The strange thing is, I can print the prompt fine.

image

Theme

Any theme has problems.

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 18.25.1

Shell: pwsh (7.4.0)

Prompt:

e79209 ~ 
Γ¥» 

Segments:

ConsoleTitle(true)                         -   1 ms
Session(true)                              -   0 ms
Path(true)                                 -   1 ms
Git(false)                                 -  11 ms
Executiontime(false)                       -   0 ms
Status(true)                               -   0 ms

Run duration: 23.664ms

Cache path: C:\Users\e79209\AppData\Local\oh-my-posh

Config path: C:\Users\e79209\AppData\Local\Programs\oh-my-posh\themes\pure.omp.json

Logs:

[DEBUG] 15:44:12.831 shell.go:Getenv:398 → NO DATA
[TRACE] 15:44:12.831 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 15:44:12.831 shell.go:Getenv:398 → C:\Users\e79209\AppData\Local
[TRACE] 15:44:12.831 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 15:44:12.831 shell_windows.go:CachePath() - 558┬╡s
[DEBUG] 15:44:12.832 shell.go:Getenv:398 → C:\Users\e79209\AppData\Local\Programs\oh-my-posh\themes\pure.omp.json
[TRACE] 15:44:12.832 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 15:44:12.832 shell.go:Shell:652 → no shell name provided in flags, trying to detect it
[DEBUG] 15:44:12.838 shell.go:Shell:660 → process name: pwsh.exe
[TRACE] 15:44:12.838 shell.go:Shell() - 6.2812ms
[TRACE] 15:44:12.838 shell.go:resolveConfigPath() - 6.2812ms
[TRACE] 15:44:12.838 shell.go:Init() - 7.421ms
[TRACE] 15:44:12.838 shell.go:Flags() - 0s
[TRACE] 15:44:12.839 config.go:loadConfig() - 1.0687ms
[TRACE] 15:44:12.839 shell.go:Flags() - 0s
[DEBUG] 15:44:12.839 shell.go:Getenv:398 → NO DATA
[TRACE] 15:44:12.839 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 15:44:12.839 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.839 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[TRACE] 15:44:12.840 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.840 shell_windows.go:WindowsRegistryKeyValue:215 → ColorizationColor(DWORD): 0xC40078D7
[TRACE] 15:44:12.840 shell.go:Shell() - 0s
[DEBUG] 15:44:12.840 shell.go:Getenv:398 → 7.4.0
[TRACE] 15:44:12.840 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 15:44:12.840 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 15:44:12.840 text.go:Render:70 → Rendering template: {{if .Root}}(Admin){{end}} {{.PWD}}
[TRACE] 15:44:12.841 shell_windows.go:Root() - 0s
[TRACE] 15:44:12.841 shell.go:Shell() - 0s
[TRACE] 15:44:12.841 shell.go:StatusCodes() - 0s
[TRACE] 15:44:12.841 shell_windows.go:IsWsl() - 0s
[DEBUG] 15:44:12.841 shell.go:TemplateCache:833 → environment: [ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\e79209\AppData\Roaming AWS_DEFAULT_REGION=us-east-1 CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=D3KD1T3 ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData Editor=code HOMEDRIVE=C: HOMEPATH=\Users\e79209 JAVA_HOME=C:\Program Files\Microsoft\jdk-11.0.20.101-hotspot\ LOCALAPPDATA=C:\Users\e79209\AppData\Local LOGONSERVER=\\AWSSSWADC002 NUMBER_OF_PROCESSORS=20 OneDrive=C:\Users\e79209\OneDrive - Sallie Mae OneDriveCommercial=C:\Users\e79209\OneDrive - Sallie Mae OS=Windows_NT Path=C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\jdk-11.0.20.101-hotspot\bin;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet-core-uninstall\;C:\Program Files\Git\cmd;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\nodejs\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\PowerShell\7\;C:\Users\e79209\AppData\Local\Programs\Python\Launcher\;C:\Users\e79209\.pyenv\pyenv-win\bin;C:\Users\e79209\.pyenv\pyenv-win\shims;C:\Users\e79209\AppData\Local\Microsoft\WindowsApps;C:\Users\e79209\.dotnet\tools;C:\Users\e79209\AppData\Roaming\npm;C:\Users\e79209\AppData\Local\Programs\oh-my-posh\bin;C:\Users\e79209\.git_commands;C:\Users\e79209\AppData\Roaming\Python\Scripts;C:\Users\e79209\.steam PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=30 POSH_GIT_ENABLED=False POSH_INSTALLER=winget POSH_PID=25372 POSH_SHELL_VERSION=7.4.0 POSH_THEME=C:\Users\e79209\AppData\Local\Programs\oh-my-posh\themes\pure.omp.json POSH_THEMES_PATH=C:\Users\e79209\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Enterprise PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 3, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9a03 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSModulePath=C:\Users\e79209\OneDrive - Sallie Mae\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public PYENV=C:\Users\e79209\.pyenv\pyenv-win\ PYENV_HOME=C:\Users\e79209\.pyenv\pyenv-win\ PYENV_ROOT=C:\Users\e79209\.pyenv\pyenv-win\ SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\e79209\AppData\Local\Temp\1 TMP=C:\Users\e79209\AppData\Local\Temp\1 UATDATA=C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77 USERDNSDOMAIN=INTERNAL.SLMBANK.NET USERDOMAIN=INTERNAL USERDOMAIN_ROAMINGPROFILE=INTERNAL USERNAME=e79209 USERPROFILE=C:\Users\e79209 windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={574e775e-4f2a-5b96-ac1e-a2962a402336} WT_SESSION=1ad25b97-1482-4d99-966a-2ac4e9106b91 ZES_ENABLE_SYSMAN=1 __PSLockDownPolicy=0]
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.841 shell.go:Pwd:428 → C:\Users\e79209
[TRACE] 15:44:12.841 shell.go:Pwd() - 0s
[DEBUG] 15:44:12.841 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.841 shell.go:User:563 → e79209
[TRACE] 15:44:12.841 shell.go:User() - 0s
[DEBUG] 15:44:12.841 shell.go:Host:575 → D3KD1T3
[TRACE] 15:44:12.841 shell.go:Host() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.841 shell.go:Getenv:398 → NO DATA
[TRACE] 15:44:12.841 shell.go:Getenv(SHLVL) - 0s
[TRACE] 15:44:12.841 shell.go:TemplateCache() - 514.5┬╡s
[DEBUG] 15:44:12.841 shell.go:Getenv:398 → 30
[TRACE] 15:44:12.841 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 15:44:12.841 shell.go:Getenv:398 → 1
[TRACE] 15:44:12.841 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 15:44:12.841 shell.go:Flags() - 0s
[TRACE] 15:44:12.841 shell.go:Flags() - 0s
[TRACE] 15:44:12.841 shell.go:Shell() - 0s
[TRACE] 15:44:12.841 shell.go:Shell() - 0s
[TRACE] 15:44:12.841 shell.go:Flags() - 0s
[TRACE] 15:44:12.841 shell.go:Flags() - 0s
[TRACE] 15:44:12.841 shell.go:Pwd() - 0s
[TRACE] 15:44:12.841 shell.go:Pwd() - 0s
[DEBUG] 15:44:12.841 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.841 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.841 segment.go:SetEnabled:512 → Segment: Path
[DEBUG] 15:44:12.841 segment.go:SetEnabled:512 → Segment: Session
[TRACE] 15:44:12.841 shell.go:Pwd() - 0s
[DEBUG] 15:44:12.841 shell.go:Getenv:398 → NO DATA
[TRACE] 15:44:12.841 shell.go:Shell() - 0s
[TRACE] 15:44:12.841 shell.go:Getenv(SSH_CONNECTION) - 0s
[TRACE] 15:44:12.841 shell.go:Flags() - 0s
[DEBUG] 15:44:12.841 shell.go:Getenv:398 → NO DATA
[TRACE] 15:44:12.841 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 15:44:12.841 shell.go:TemplateCache() - 0s
[DEBUG] 15:44:12.841 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 15:44:12.841 properties.go:GetString:28 → 
[DEBUG] 15:44:12.841 properties.go:GetString:28 → 
[DEBUG] 15:44:12.841 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.841 properties.go:GetString:28 → ~
[DEBUG] 15:44:12.841 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 15:44:12.841 shell.go:PathSeparator() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:PathSeparator() - 0s
[TRACE] 15:44:12.841 shell.go:PathSeparator() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:PathSeparator() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:PathSeparator() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:GOOS() - 0s
[TRACE] 15:44:12.841 shell.go:PathSeparator() - 0s
[TRACE] 15:44:12.841 shell.go:Pwd() - 0s
[TRACE] 15:44:12.841 shell_windows.go:IsWsl() - 0s
[TRACE] 15:44:12.841 shell.go:StackCount() - 0s
[DEBUG] 15:44:12.842 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 15:44:12.842 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 15:44:12.842 win32_windows.go:isWriteable:311 Γåô
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 15:44:12.842 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 15:44:12.842 shell_windows.go:DirIsWritable() - 1.0235ms
[TRACE] 15:44:12.842 shell.go:TemplateCache() - 0s
[DEBUG] 15:44:12.842 text.go:Render:70 → Rendering template: {{ .Path }} 
[DEBUG] 15:44:12.842 text.go:Render:70 → Rendering template: {{ .UserName }} 
[TRACE] 15:44:12.842 shell.go:TemplateCache() - 0s
[TRACE] 15:44:12.842 shell.go:TemplateCache() - 0s
[TRACE] 15:44:12.842 shell.go:Shell() - 0s
[TRACE] 15:44:12.842 shell.go:Shell() - 0s
[DEBUG] 15:44:12.843 text.go:Render:70 → Rendering template: plain
[DEBUG] 15:44:12.843 text.go:Render:70 → Rendering template: plain
[TRACE] 15:44:12.843 shell.go:Shell() - 0s
[TRACE] 15:44:12.843 shell.go:Shell() - 0s
[TRACE] 15:44:12.843 shell.go:Shell() - 0s
[TRACE] 15:44:12.843 shell.go:Flags() - 0s
[TRACE] 15:44:12.843 shell.go:Pwd() - 0s
[DEBUG] 15:44:12.843 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.843 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.843 segment.go:SetEnabled:512 → Segment: Git
[TRACE] 15:44:12.843 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.854 shell.go:CommandPath:614 → C:\Program Files\Git\cmd\git.exe
[TRACE] 15:44:12.854 shell.go:CommandPath(git.exe) - 10.8533ms
[TRACE] 15:44:12.854 shell.go:HasCommand(git.exe) - 10.8533ms
[TRACE] 15:44:12.854 shell.go:Pwd() - 0s
[ERROR] 15:44:12.854 shell.go:HasParentFilePath:748 → CreateFile .git: The system cannot find the file specified.
[TRACE] 15:44:12.854 shell.go:HasParentFilePath(.git) - 538.3┬╡s
[DEBUG] 15:44:12.854 properties.go:GetBool:22 → fetch_bare_info: false
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Flags() - 0s
[TRACE] 15:44:12.854 shell.go:Pwd() - 0s
[DEBUG] 15:44:12.854 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.854 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.854 segment.go:SetEnabled:512 → Segment: Executiontime
[DEBUG] 15:44:12.854 properties.go:GetBool:22 → always_enabled: false
[TRACE] 15:44:12.854 shell.go:ExecutionTime() - 0s
[DEBUG] 15:44:12.854 properties.go:GetFloat64:34 → threshold: 500.000000
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Flags() - 0s
[DEBUG] 15:44:12.854 properties.go:GetString:28 → {{ .Code }}
[TRACE] 15:44:12.854 shell.go:Pwd() - 0s
[DEBUG] 15:44:12.854 shell_windows.go:56 → C:\Users\e79209
[TRACE] 15:44:12.854 shell.go:GOOS() - 0s
[DEBUG] 15:44:12.854 segment.go:SetEnabled:512 → Segment: Status
[TRACE] 15:44:12.854 shell.go:StatusCodes() - 0s
[DEBUG] 15:44:12.854 text.go:Render:70 → Rendering template: {{ .Code }}
[TRACE] 15:44:12.854 shell.go:TemplateCache() - 0s
[DEBUG] 15:44:12.854 properties.go:GetBool:22 → always_enabled: true
[TRACE] 15:44:12.854 shell.go:TemplateCache() - 0s
[DEBUG] 15:44:12.854 text.go:Render:70 → Rendering template: ❯ 
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[DEBUG] 15:44:12.854 shell.go:Getenv:398 → NO DATA
[TRACE] 15:44:12.854 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 15:44:12.854 text.go:Render:70 → Rendering template: {{ if gt .Code 0 }}#BF616A{{ end }}
[TRACE] 15:44:12.854 shell.go:TemplateCache() - 0s
[DEBUG] 15:44:12.854 text.go:Render:70 → Rendering template: plain
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Flags() - 0s
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[TRACE] 15:44:12.854 shell.go:Shell() - 0s
[DEBUG] 15:44:12.855 shell.go:Getenv:398 → C:\Users\e79209\AppData\Local
[TRACE] 15:44:12.855 shell.go:Getenv(LOCALAPPDATA) - 505.7┬╡s
[TRACE] 15:44:12.855 shell_windows.go:CachePath() - 528.8┬╡s
[TRACE] 15:44:12.855 shell.go:Flags() - 0s
FrenchMasta commented 10 months ago

I too recently upgraded to PowerShell 7.4.0 and this weird font issue occurred.

I ran the update command using winget today (2023-11-18) but not fixed

JanDeDobbeleer commented 10 months ago

@FrenchMasta this is a PowerShell UTF8 issue, so if they changed something there (maybe Start-Process encoding) they have a bug on their end. Nothing changed on our end in that area, so please create a bug on their end. As a temporary workaround, the solution here might also apply for this issue.

wekempf commented 10 months ago

If it's simply a UTF8 issue, then why does oh-my-posh print ... display correctly? I wouldn't have posted here if not for this fact.

JanDeDobbeleer commented 10 months ago

@wekempf because PSReadline handles things differently under the hood. Lots of annoying quirks due to not being UTF8 by default. If the move to 7.4 changes this behavior, they need to explain exactly what's going on. It's not listed in the changelog. I can't debug PowerShell itself.

JanDeDobbeleer commented 10 months ago

@wekempf I had a look on my machine, running 7.4.0 and I can't reproduce this. So, it's either a font issue (non V3 Nerd Font), or an encoding issue. I propose to download and install the latest patched version of the font and try again. If that doesn't work, it's a bug for PowerShell.

image

svdbrg commented 10 months ago

I'm noticing the same behavior on 7.4. However, output briefly renders correctly if I hit CTRL+L, but is then obscured again after the next command. Definitely something to do with Powershell, just need to figure out what :)

svdbrg commented 10 months ago

Update: Setting the output encoding to UTF8 according to this link solved it for me. Just had to remove the finally-block.

$previousOutputEncoding = [Console]::OutputEncoding
[Console]::OutputEncoding = [Text.Encoding]::UTF8

try {
    oh-my-posh init pwsh --config ~/theme.omp.json | Invoke-Expression
} finally {
}
github-actions[bot] commented 3 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.