JanDeDobbeleer / oh-my-posh

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

`oh-my-posh config export` fails with exit code 2 #5482

Closed mdanish-kh closed 2 weeks ago

mdanish-kh commented 3 weeks ago

Code of Conduct

What happened?

Trying out the following commands fail with no output and exit code 2

oh-my-posh config export
oh-my-posh config export --config "$env:USERPROFILE\Documents\PowerShell\themes\oh-my-posh_theme.omp.json"

Theme

Not relevant to themes. This appears to be a CLI issue.

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

~ oh-my-posh prompt debug powershell --plain

Version: 23.6.6

Shell: powershell (7.4.4)

Prompt:

 ~

Segments:

ConsoleTitle(false)                        -   0 ms
Path(true)                                 -   4 ms
Text(false)                                -   0 ms
Executiontime(false)                       -   0 ms

Run duration: 14.7139ms

Cache path: C:\Users\<REDACTED>\AppData\Local\oh-my-posh

Config path: C:\Users\<REDACTED>\Documents\PowerShell\themes\oh-my-posh_theme.omp.json

Logs:

[DEBUG] 16:06:23.494 debug.go:42 → debug mode enabled
[DEBUG] 16:06:23.495 debug.go:42 → plain mode enabled
[DEBUG] 16:06:23.495 terminal.go:Getenv:171 → C:\Users\<REDACTED>\AppData\Local
[TRACE] 16:06:23.495 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 16:06:23.495 terminal_windows.go:CachePath() - 0s
[DEBUG] 16:06:23.495 terminal.go:70 → loading cache file: C:\Users\<REDACTED>\AppData\Local\oh-my-posh\omp.cache
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_12472
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_28536
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_29088
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_9080
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_41120
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_41696
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_1580
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_1820
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_19428
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_24232
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_28600
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_30312
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_28436
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_35928
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_10564
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_1292
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_15812
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_19044
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_2384
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_24472
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_37648
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_7520
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_5008
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_13504
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_1356
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_17144
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_32016
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_35544
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_38944
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_35356
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_35404
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_10864
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_1828
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_24004
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_27628
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_28568
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_34480
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_37956
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_39804
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_41656
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_11348
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_19952
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_21596
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_30956
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_33468
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_4040
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_13732
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_31032
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache_32780
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: upgrade_check
[TRACE] 16:06:23.496 terminal.go(C:\Users\<REDACTED>\AppData\Local\oh-my-posh\omp.cache) - 537.8µs
[DEBUG] 16:06:23.496 terminal.go:Getenv:171 → C:\Users\<REDACTED>\AppData\Local
[TRACE] 16:06:23.496 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 16:06:23.496 terminal_windows.go:CachePath() - 0s
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache file: C:\Users\<REDACTED>\AppData\Local\oh-my-posh\omp.cache.29088
[DEBUG] 16:06:23.496 terminal.go:70 → loading cache key: prompt_count_cache
[TRACE] 16:06:23.496 terminal.go(C:\Users\<REDACTED>\AppData\Local\oh-my-posh\omp.cache.29088) - 0s
[DEBUG] 16:06:23.496 terminal.go:Getenv:171 → C:\Users\<REDACTED>\Documents\PowerShell\themes\oh-my-posh_theme.omp.json
[TRACE] 16:06:23.496 terminal.go:Getenv(POSH_THEME) - 0s
[DEBUG] 16:06:23.496 terminal.go:resolveConfigPath:99 → config set using POSH_THEME: C:\Users\<REDACTED>\Documents\PowerShell\themes\oh-my-posh_theme.omp.json
[TRACE] 16:06:23.496 terminal.go:resolveConfigPath() - 0s
[TRACE] 16:06:23.496 terminal.go:SetPromptCount() - 0s
[TRACE] 16:06:23.496 terminal.go:Init() - 1.574ms
[TRACE] 16:06:23.496 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 load.go:loadConfig() - 1.0053ms
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.497 debug.go:50 → terminal program: Windows Terminal
[DEBUG] 16:06:23.497 debug.go:50 → terminal shell: shell
[DEBUG] 16:06:23.497 terminal.go:Getenv:171 → NO DATA
[TRACE] 16:06:23.497 terminal.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 16:06:23.497 terminal_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.497 terminal_windows.go:WindowsRegistryKeyValue:226 → ColorizationColor(DWORD): 0xC40078D4
[TRACE] 16:06:23.497 terminal.go:Shell() - 0s
[DEBUG] 16:06:23.497 terminal.go:Getenv:171 → 7.4.4
[TRACE] 16:06:23.497 terminal.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 16:06:23.497 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 16:06:23.497 text.go:Render:80 → rendering template:
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal.go:Shell() - 0s
[DEBUG] 16:06:23.497 terminal.go:Getenv:171 → 21
[TRACE] 16:06:23.497 terminal.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 16:06:23.497 terminal.go:Getenv:171 → 1
[TRACE] 16:06:23.497 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.497 status.go:Init:53 → {{ if eq .Code 0 }}{{ else }} {{ reason .Code }}{{ end }}
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.497 terminal.go:Pwd:201 → C:\Users\<REDACTED>
[TRACE] 16:06:23.497 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.497 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.497 terminal.go:Pwd() - 0s
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.497 segment.go:SetEnabled:115 → segment: Path
[DEBUG] 16:06:23.497 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.497 segment.go:SetEnabled:115 → segment: Root
[DEBUG] 16:06:23.497 path.go:128 → display_cygpath: false
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.497 terminal.go:PathSeparator() - 0s
[TRACE] 16:06:23.497 terminal.go:Pwd() - 0s
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal.go:Shell() - 0s
[TRACE] 16:06:23.497 terminal.go:Shell() - 0s
[TRACE] 16:06:23.497 terminal.go:Flags() - 0s
[TRACE] 16:06:23.497 terminal_windows.go:Root() - 0s
[TRACE] 16:06:23.497 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.497 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.497 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.497 segment.go:SetEnabled:115 → segment: Status
[TRACE] 16:06:23.497 terminal.go:StatusCodes() - 0s
[DEBUG] 16:06:23.497 path.go:replaceMappedLocations:514 → mapped_locations_enabled: true
[DEBUG] 16:06:23.498 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.498 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.498 segment.go:SetEnabled:115 → segment: Git
[TRACE] 16:06:23.498 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.498 terminal.go:Getenv:171 → C:\Users\<REDACTED>\AppData\Local
[DEBUG] 16:06:23.498 path.go:replaceMappedLocations:515 → 
[DEBUG] 16:06:23.498 path.go:replaceMappedLocations:516 → 
[DEBUG] 16:06:23.498 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.498 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.498 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.498 path.go:replaceMappedLocations:517 → ~
[DEBUG] 16:06:23.498 text.go:Render:80 → rendering template: {{ if eq .Code 0 }}{{ else }} {{ reason .Code }}{{ end }}
[DEBUG] 16:06:23.498 path.go:replaceMappedLocations:522 → mapped_locations: map[]
[TRACE] 16:06:23.498 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.498 terminal.go:Flags() - 0s
[TRACE] 16:06:23.498 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.499 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.499 path.go:makeFolderFormatMap:838 → NO DATA
[DEBUG] 16:06:23.499 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.499 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.499 path.go:colorizePath:712 → cycle: []
[DEBUG] 16:06:23.499 path.go:getFolderSeparator:250 → NO DATA
[DEBUG] 16:06:23.499 path.go:getFolderSeparator:252 → /
[DEBUG] 16:06:23.499 path.go:colorizePath:715 → cycle_folder_separator: false
[DEBUG] 16:06:23.499 path.go:colorizePath:716 → %s
[DEBUG] 16:06:23.499 path.go:colorizePath:718 → %s
[DEBUG] 16:06:23.499 path.go:colorizePath:719 → %s
[DEBUG] 16:06:23.499 path.go:colorizePath:720 → %s
[TRACE] 16:06:23.499 terminal.go:Pwd() - 0s
[TRACE] 16:06:23.499 terminal_windows.go:Root() - 0s
[TRACE] 16:06:23.499 terminal.go:Shell() - 0s
[TRACE] 16:06:23.499 terminal.go:StatusCodes() - 0s
[TRACE] 16:06:23.499 terminal_windows.go:IsWsl() - 0s
[DEBUG] 16:06:23.500 terminal.go:TemplateCache:660 → environment: [ALLUSERSPROFILE=C:\ProgramData ANDROID_HOME=C:\Users\<REDACTED>\AppData\Local\Android\Sdk APPDATA=C:\Users\<REDACTED>\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey\ ChocolateyLastPathUpdate=133608805876570913 ChocolateyToolsLocation=C:\Tools\ CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=DESKTOP-NB5ENVR ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData GIT_LFS_PATH=C:\Program Files\Git LFS GOPATH=C:\Users\<REDACTED>\go HOMEDRIVE=C: HOMEPATH=\Users\<REDACTED> JAVA_HOME=C:\Program Files\Microsoft\jdk-17.0.11.9-hotspot\ LOCALAPPDATA=C:\Users\<REDACTED>\AppData\Local LOGONSERVER=\\DESKTOP-NB5ENVR NUMBER_OF_PROCESSORS=12 OneDrive=C:\Users\<REDACTED>\OneDrive OS=Windows_NT PATH=C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.4.0_x64__8wekyb3d8bbwe;C:\Program Files\Microsoft\jdk-17.0.11.9-hotspot\bin;C:\Program Files\Microsoft\jdk-21.0.3.9-hotspot\bin;C:\Program Files\Python311\Scripts\;C:\Program Files\Python311\;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git LFS;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\FlutterSDK\flutter\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Users\<REDACTED>\AppData\Local\Android\Sdk\platform-tools;;C:\Program Files\gsudo\Current;C:\Program Files\Cloudflare\Cloudflare WARP\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\nodejs\;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\GitHub CLI\;C:\Program Files\Go\bin;C:\Program Files\PowerShell\7\;C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\<REDACTED>\AppData\Local\Programs\Python\Python312\;C:\Users\<REDACTED>\AppData\Local\Programs\Python\Launcher\;C:\Users\<REDACTED>\scoop\shims;C:\Program Files\MySQL\MySQL Shell 8.2\bin\;C:\Users\<REDACTED>\.cargo\bin;C:\Users\<REDACTED>\AppData\Local\pnpm;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\<REDACTED>\AppData\Local\Microsoft\WindowsApps;C:\Users\<REDACTED>\AppData\Local\Programs\oh-my-posh\bin;C:\Users\<REDACTED>\AppData\Local\Programs\Microsoft VS Code\bin;C:\msys64\mingw64\bin;C:\Users\<REDACTED>\.platformio\penv\Scripts;C:\Program Files\Notepad++;C:\Program Files (x86)\Microsoft\Edge\Application;C:\Users\<REDACTED>\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Coder\bin;C:\Users\<REDACTED>\AppData\Local\Microsoft\WinGet\Links;C:\Users\<REDACTED>\AppData\Local\Programs\mongosh\;C:\Program Files\Vim\vim90;C:\Users\<REDACTED>\.dotnet\tools;C:\Users\<REDACTED>\go\bin;C:\Program Files\Neovim\bin;C:\FlutterSDK\flutter\bin;C:\Program Files\JetBrains\PyCharm Community Edition 2023.3.4\bin;C:\ProgramData\chocolatey\bin;C:\Users\<REDACTED>\AppData\Local\Programs\Fiddler;C:\Users\<REDACTED>\AppData\Local\Microsoft\WinGet\Packages\pbek.QOwnNotes_Microsoft.Winget.Source_8wekyb3d8bbwe;c:\users\<REDACTED>\.local\bin;C:\Users\<REDACTED>\.ebcli-virtual-env\executables;C:\Tools\dart-sdk\bin;C:\Users\<REDACTED>\AppData\Local\Pub\Cache\bin;C:\Users\<REDACTED>\AppData\Local\Android\Sdk\platform-tools;C:\Users\<REDACTED>\AppData\Roaming\npm;C:\Users\<REDACTED>\.dotnet\tools;C:\Users\<REDACTED>\go\bin;C:\Users\<REDACTED>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL PNPM_HOME=C:\Users\<REDACTED>\AppData\Local\pnpm POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=21 POSH_GIT_ENABLED=False POSH_INSTALLER=winget POSH_PID=29088 POSH_SHELL_VERSION=7.4.4 POSH_THEME=C:\Users\<REDACTED>\Documents\PowerShell\themes\oh-my-posh_theme.omp.json POSH_THEMES_PATH=C:\Users\<REDACTED>\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Home PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=a502 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSModulePath=C:\Users\<REDACTED>\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\windowsapps\microsoft.powershell_7.4.4.0_x64__8wekyb3d8bbwe\Modules;C:\Users\<REDACTED>\Documents\WindowsPowerShell\Modules;C:\Users\<REDACTED>\<REDACTED>sh-kh\winget-dsc\resources;C:\Users\<REDACTED>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\PowerShell;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules; PUBLIC=C:\Users\Public PyCharm Community Edition=C:\Program Files\JetBrains\PyCharm Community Edition 2023.3.4\bin; SESSIONNAME=Console SUMO_HOME=C:\Program Files (x86)\Eclipse\Sumo\ SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\<REDACTED>\AppData\Local\Temp TMP=C:\Users\<REDACTED>\AppData\Local\Temp USERDOMAIN=DESKTOP-NB5ENVR USERDOMAIN_ROAMINGPROFILE=DESKTOP-NB5ENVR USERNAME=<REDACTED> USERPROFILE=C:\Users\<REDACTED> windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={574e775e-4f2a-5b96-ac1e-a2962a402336} WT_SESSION=21bbf5f0-b435-4035-b306-d7ef6453fe30 ZES_ENABLE_SYSMAN=1]
[TRACE] 16:06:23.500 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.500 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.500 terminal_windows.go:IsWsl() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.500 terminal.go:User:339 → <REDACTED>
[TRACE] 16:06:23.500 terminal.go:User() - 0s
[DEBUG] 16:06:23.500 terminal.go:Host:356 → DESKTOP-NB5ENVR
[TRACE] 16:06:23.500 terminal.go:Host() - 0s
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.500 terminal.go:Getenv:171 → NO DATA
[TRACE] 16:06:23.500 terminal.go:Getenv(SHLVL) - 0s
[TRACE] 16:06:23.500 terminal.go:TemplateCache() - 999.7µs
[TRACE] 16:06:23.500 terminal.go:GOOS() - 0s
[TRACE] 16:06:23.500 terminal.go:TemplateCache() - 0s
[TRACE] 16:06:23.500 terminal.go:StackCount() - 0s
[DEBUG] 16:06:23.500 status.go:Enabled:42 → always_enabled: false
[DEBUG] 16:06:23.501 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 16:06:23.501 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 16:06:23.501 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 16:06:23.501 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 16:06:23.501 terminal_windows.go:DirIsWritable() - 1.0951ms
[TRACE] 16:06:23.501 terminal.go:TemplateCache() - 0s
[DEBUG] 16:06:23.508 terminal.go:CommandPath:398 → C:\Program Files\Git\cmd\git.exe
[TRACE] 16:06:23.508 terminal.go:CommandPath(git.exe) - 10.1544ms
[TRACE] 16:06:23.508 terminal.go:HasCommand(git.exe) - 10.1544ms
[DEBUG] 16:06:23.508 git.go:shouldDisplay:285 → fetch_bare_info: false
[TRACE] 16:06:23.508 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.508 terminal.go:ResolveSymlink:298 → C:\Users\<REDACTED>
[TRACE] 16:06:23.508 terminal.go:ResolveSymlink(C:\Users\<REDACTED>) - 0s
[ERROR] 16:06:23.508 terminal.go:HasParentFilePath:562 → CreateFile .git: The system cannot find the file specified.
[TRACE] 16:06:23.508 terminal.go:HasParentFilePath(.git) - 0s
[DEBUG] 16:06:23.508 text.go:Render:80 → rendering template:  {{ .Path }}
[TRACE] 16:06:23.508 terminal.go:Flags() - 0s
[TRACE] 16:06:23.509 terminal.go:TemplateCache() - 0s
[DEBUG] 16:06:23.509 text.go:Render:80 → rendering template: powerline
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.509 text.go:Render:80 → rendering template: powerline
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.509 text.go:Render:80 → rendering template: powerline
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.509 text.go:Render:80 → rendering template: plain
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[TRACE] 16:06:23.509 terminal.go:Shell() - 0s
[TRACE] 16:06:23.509 terminal.go:Shell() - 0s
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[TRACE] 16:06:23.509 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.509 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.509 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.509 segment.go:SetEnabled:115 → segment: Executiontime
[DEBUG] 16:06:23.509 executiontime.go:Enabled:57 → always_enabled: false
[TRACE] 16:06:23.509 terminal.go:ExecutionTime() - 0s
[DEBUG] 16:06:23.509 executiontime.go:Enabled:59 → threshold: 10000.000000
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[TRACE] 16:06:23.509 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.509 terminal_windows.go:58 → C:\Users\<REDACTED>
[TRACE] 16:06:23.509 terminal.go:GOOS() - 0s
[DEBUG] 16:06:23.509 segment.go:SetEnabled:115 → segment: Text
[TRACE] 16:06:23.509 terminal.go:TemplateCache() - 0s
[DEBUG] 16:06:23.509 text.go:Render:80 → rendering template:
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[TRACE] 16:06:23.509 terminal.go:TemplateCache() - 0s
[TRACE] 16:06:23.509 terminal.go:Shell() - 0s
[TRACE] 16:06:23.509 terminal.go:Shell() - 0s
[TRACE] 16:06:23.509 terminal.go:Shell() - 0s
[TRACE] 16:06:23.509 terminal.go:Pwd() - 0s
[DEBUG] 16:06:23.509 terminal.go:Getenv:171 → NO DATA
[TRACE] 16:06:23.509 terminal.go:Getenv(OSTYPE) - 0s
[TRACE] 16:06:23.509 terminal_windows.go:IsCygwin() - 0s
[DEBUG] 16:06:23.509 text.go:Render:80 → rendering template: osc99
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
[DEBUG] 16:06:23.509 terminal.go:User:339 → <REDACTED>
[TRACE] 16:06:23.509 terminal.go:User() - 0s
[TRACE] 16:06:23.509 terminal.go:Host() - 0s
[TRACE] 16:06:23.509 terminal.go:Shell() - 0s
[DEBUG] 16:06:23.509 terminal.go:Getenv:171 → C:\Users\<REDACTED>\AppData\Local
[TRACE] 16:06:23.509 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 16:06:23.509 terminal_windows.go:CachePath() - 0s
[TRACE] 16:06:23.509 terminal.go:Flags() - 0s
lewis-yeung commented 3 weeks ago

That's the expected exit code since neither the output path nor the export format is specified, but an error message is missing, IMO.

https://github.com/JanDeDobbeleer/oh-my-posh/blob/b3e851ebb193cb0b1ebec47ab16bd8f97c25645f/src/cli/config_export.go#L48-L51

I'm preparing a PR to revise the help text and add error messages.