Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

In 24.4.0 using a theme in git bash results in a Config Error #5882

Closed
1 task done
ArielLeslie opened this issue Nov 13, 2024 · 4 comments
Closed
1 task done

In 24.4.0 using a theme in git bash results in a Config Error #5882

ArielLeslie opened this issue Nov 13, 2024 · 4 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@ArielLeslie
Copy link

ArielLeslie commented Nov 13, 2024

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

After updating oh-my-posh from 23 to 24.4.0, my Git Bash terminal displays CONFIG ERROR if I use any theme.
Theming was previously working using a url for a remote config (eg: eval "$(oh-my-posh init bash --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json')")

  • I tried switching to a fully justified local theme path (eg: eval "$(oh-my-posh init bash --config C:/Users/me/AppData/Local/oh-my-posh/main/themes/jandedobbeleer.omp.json')"
    • I verified that the path is correct
  • I tried using about 3 different themes for both remote and local configs.
  • If I comment out the theme line, I do not see any errors
  • There are no errors present when I run dubug with the theme applied that are not present when I run it without the theme applied.
  • In v23, I had the config line in my .bashrc file. There is no difference in behavior if I move it to either .bash_profile or .profile. All fail in the same way

Theme

This is consistent across all themes.

What OS are you seeing the problem on?

Windows

Which shell are you using?

bash

Log output

Version: 24.4.0

Shell: bash (5.2.26(1)-release)

Prompt:

 ariel   \[\\]~\[\\]  CONFIG ERROR  \[\]                                                           in ba
sh at 11:53:27\[
Segments:

ConsoleTitle(true)                        -   0 ms
Session(true)                             -   0 ms
Path(true)                                -   2 ms
Git(false)                                -   1 ms
Root(false)                               -   1 ms
Status(true)                              -   0 ms
Node(false)                               -   0 ms
Go(false)                                 -   0 ms
Python(false)                             -   0 ms
Shell(true)                               -   0 ms
Time(true)                                -   0 ms

Run duration: 5.6573ms

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

Config path: no --config set, using default built-in configuration

Logs:

[DEBUG] 11:53:27.327 debug.go:50 → debug mode enabled
[DEBUG] 11:53:27.328 debug.go:50 → plain mode enabled
[TRACE] 11:53:27.328 terminal.go() - 0s
[DEBUG] 11:53:27.328 terminal.go:64 → loading cache file: C:\Users\ariel\AppData\Local\oh-my-posh\omp.cache
[DEBUG] 11:53:27.328 terminal.go:64 → loading cache key: upgrade_check
[TRACE] 11:53:27.328 terminal.go(C:\Users\ariel\AppData\Local\oh-my-posh\omp.cache) - 0s
[TRACE] 11:53:27.328 terminal.go() - 0s
[DEBUG] 11:53:27.328 terminal.go:64 → loading cache file: C:\Users\ariel\AppData\Local\oh-my-posh\omp.cache.9b90b0a3-e024-41dd-a930-24c21d157cda
[DEBUG] 11:53:27.328 terminal.go:64 → loading cache key: prompt_count_cache
[DEBUG] 11:53:27.328 terminal.go:64 → loading cache key: template_cache
[TRACE] 11:53:27.328 terminal.go(C:\Users\ariel\AppData\Local\oh-my-posh\omp.cache.9b90b0a3-e024-41dd-a930-24c21d157cda) - 0s
[TRACE] 11:53:27.328 terminal.go:setPromptCount() - 0s
[TRACE] 11:53:27.328 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.328 terminal.go:setPwd:135 → C:\Users\ariel
[TRACE] 11:53:27.328 terminal.go:setPwd() - 505.2µs
[TRACE] 11:53:27.328 terminal.go:Init() - 1.1988ms
[TRACE] 11:53:27.328 terminal.go:Shell() - 0s
[TRACE] 11:53:27.328 terminal.go:Flags() - 0s
[TRACE] 11:53:27.328 cache.go:loadCache() - 0s
[DEBUG] 11:53:27.328 debug.go:59 → terminal program: Windows Terminal
[DEBUG] 11:53:27.328 debug.go:59 → terminal shell: bash
[DEBUG] 11:53:27.328 terminal.go:Getenv:102 → NO DATA
[TRACE] 11:53:27.328 terminal.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 11:53:27.328 terminal_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[DEBUG] 11:53:27.328 terminal_windows.go:WindowsRegistryKeyValue:197 → ColorizationColor(DWORD): 0xC4680081
[TRACE] 11:53:27.328 colors_windows.go:GetAccentColor() - 248.4µs
[TRACE] 11:53:27.328 colors.go:SetAccentColor() - 248.4µs
[TRACE] 11:53:27.328 terminal.go:Shell() - 0s
[DEBUG] 11:53:27.328 terminal.go:Getenv:102 → 5.2.26(1)-release
[TRACE] 11:53:27.328 terminal.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 11:53:27.328 debug.go:PrintDebug:24 → segment: Title
[TRACE] 11:53:27.328 engine.go:getTitleTemplateText({{ .Shell }} in {{ .Folder }}) - 0s
[TRACE] 11:53:27.328 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.328 terminal.go:Getenv:102 → NO DATA
[TRACE] 11:53:27.328 terminal.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 11:53:27.328 terminal.go:Getenv:102 → NO DATA
[TRACE] 11:53:27.328 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 11:53:27.328 terminal.go:Flags() - 0s
[TRACE] 11:53:27.328 terminal.go:Flags() - 0s
[TRACE] 11:53:27.328 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.328 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.328 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.328 segment.go:Execute:108 → segment: Status
[TRACE] 11:53:27.328 terminal.go:StatusCodes() - 0s
[DEBUG] 11:53:27.328 status.go:formatStatus:45 → {{ .Code }}
[TRACE] 11:53:27.329 status.go:formatStatus({{ .Code }}) - 524.5µs
[DEBUG] 11:53:27.329 status.go:Enabled:37 → always_enabled: true
[TRACE] 11:53:27.329 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.329 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.329 segment.go:Execute:108 → segment: Git
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.329 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.329 segment.go:Execute:108 → segment: Path
[DEBUG] 11:53:27.329 path.go:146 → display_cygpath: false
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 path.go:setPaths() - 0s
[TRACE] 11:53:27.329 terminal.go:Shell() - 0s
[TRACE] 11:53:27.329 terminal.go:Shell() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.329 path.go:setMappedLocations:556 → mapped_locations_enabled: true
[DEBUG] 11:53:27.329 path.go:setMappedLocations:557 → 
[DEBUG] 11:53:27.329 path.go:setMappedLocations:558 → 
[DEBUG] 11:53:27.329 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.329 clean.go:Clean() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.329 path.go:setMappedLocations:559 → ~
[DEBUG] 11:53:27.329 path.go:setMappedLocations:564 → mapped_locations: map[]
[TRACE] 11:53:27.329 clean.go:Clean() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 clean.go:Clean() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.329 path.go:colorizePath:733 → cycle: []
[DEBUG] 11:53:27.329 path.go:getFolderSeparator:266 → NO DATA
[DEBUG] 11:53:27.329 path.go:getFolderSeparator:268 → \
[DEBUG] 11:53:27.329 path.go:colorizePath:736 → cycle_folder_separator: false
[DEBUG] 11:53:27.329 path.go:colorizePath:737 → %s
[DEBUG] 11:53:27.329 path.go:colorizePath:739 → %s
[DEBUG] 11:53:27.329 path.go:colorizePath:740 → %s
[DEBUG] 11:53:27.329 path.go:colorizePath:741 → %s
[TRACE] 11:53:27.329 terminal.go:Flags() - 0s
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.329 terminal.go:Flags() - 0s
[TRACE] 11:53:27.329 terminal.go:StackCount() - 0s
[DEBUG] 11:53:27.329 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.329 segment.go:Execute:108 → segment: Root
[TRACE] 11:53:27.329 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.329 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.329 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.329 segment.go:Execute:108 → segment: Session
[DEBUG] 11:53:27.329 terminal.go:Getenv:102 → NO DATA
[TRACE] 11:53:27.330 terminal.go:Getenv(SSH_CONNECTION) - 512.4µs
[DEBUG] 11:53:27.330 terminal.go:Getenv:102 → NO DATA
[TRACE] 11:53:27.330 terminal.go:Getenv(SSH_CLIENT) - 0s
[DEBUG] 11:53:27.330 terminal.go:CommandPath:337 → C:\Program Files\Git\mingw64\bin\git.exe
[TRACE] 11:53:27.330 terminal.go:CommandPath(git.exe) - 668.9µs
[TRACE] 11:53:27.330 terminal.go:HasCommand(git.exe) - 668.9µs
[DEBUG] 11:53:27.330 git.go:shouldDisplay:327 → fetch_bare_info: false
[DEBUG] 11:53:27.330 terminal.go:ResolveSymlink:228 → C:\Users\ariel
[TRACE] 11:53:27.330 terminal.go:ResolveSymlink(C:\Users\ariel) - 678.5µs
[TRACE] 11:53:27.330 segment.go:string( {{ if .SSHSession }} {{ end }}{{ .UserName }} ) - 745.6µs
[TRACE] 11:53:27.331 segment.go:resolve(diamond) - 0s
[ERROR] 11:53:27.331 terminal.go:HasParentFilePath:503 → CreateFile .git: The system cannot find the file specified.
[TRACE] 11:53:27.331 terminal.go:HasParentFilePath(.git) - 1.2829ms
[TRACE] 11:53:27.331 terminal_windows.go:Root() - 1.8624ms
[DEBUG] 11:53:27.331 win32_windows.go:isWriteable:258 → not current user or in group
[DEBUG] 11:53:27.331 win32_windows.go:isWriteable:262 → current user is member of S-1-5-32-544
[DEBUG] 11:53:27.331 win32_windows.go:isWriteable:270 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 11:53:27.332 win32_windows.go:isWriteable:272 → user has write access
[TRACE] 11:53:27.332 terminal_windows.go:DirIsWritable() - 2.9778ms
[TRACE] 11:53:27.332 segment.go:string(  {{ path .Path .Location }} ) - 95µs
[TRACE] 11:53:27.332 segment.go:resolve(powerline) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(powerline) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(powerline) - 0s
[TRACE] 11:53:27.332 segment.go:string( CONFIG ERROR ) - 0s
[TRACE] 11:53:27.332 list.go:FirstMatch(p:red) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(diamond) - 0s
[TRACE] 11:53:27.332 list.go:FirstMatch(p:red) - 0s
[TRACE] 11:53:27.332 terminal.go:Shell() - 0s
[TRACE] 11:53:27.332 terminal.go:Shell() - 0s
[TRACE] 11:53:27.332 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.332 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.332 segment.go:Execute:108 → segment: Time
[TRACE] 11:53:27.332 terminal.go:Flags() - 0s
[TRACE] 11:53:27.332 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.332 time.go:Enabled:27 → 15:04:05
[TRACE] 11:53:27.332 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.332 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.332 segment.go:Execute:108 → segment: Shell
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.332 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.332 shell.go:Enabled:26 → mapped_shell_names: map[]
[DEBUG] 11:53:27.332 segment.go:Execute:108 → segment: Python
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.332 terminal.go:Shell() - 0s
[TRACE] 11:53:27.332 terminal.go:GOOS() - 0s
[TRACE] 11:53:27.332 terminal.go:Flags() - 0s
[DEBUG] 11:53:27.332 segment.go:Execute:108 → segment: Go
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[DEBUG] 11:53:27.332 python.go:Enabled:56 → files
[TRACE] 11:53:27.332 terminal.go:GOOS() - 0s
[DEBUG] 11:53:27.332 segment.go:Execute:108 → segment: Node
[DEBUG] 11:53:27.332 language.go:Enabled:117 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 11:53:27.332 language.go:Enabled:118 → folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 11:53:27.332 language.go:Enabled:117 → extensions: [*.go go.mod]
[DEBUG] 11:53:27.332 language.go:Enabled:118 → folders: []
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[DEBUG] 11:53:27.332 language.go:Enabled:125 → home_enabled: false
[DEBUG] 11:53:27.332 home.go:Home:16 → C:\Users\ariel
[TRACE] 11:53:27.332 segment.go:resolve(plain) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(plain) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(plain) - 0s
[TRACE] 11:53:27.332 segment.go:string(in <p:blue><b>{{ .Name }}</b></> ) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(plain) - 0s
[TRACE] 11:53:27.332 segment.go:string(at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>) - 0s
[TRACE] 11:53:27.332 segment.go:resolve(plain) - 0s
[TRACE] 11:53:27.332 terminal.go:Shell() - 0s
[TRACE] 11:53:27.332 terminal.go:Shell() - 0s
[TRACE] 11:53:27.333 terminal.go:Flags() - 0s
[TRACE] 11:53:27.333 terminal.go:Shell() - 0s
[DEBUG] 11:53:27.333 terminal_windows.go:TerminalWidth:98 → terminal width: 111
[TRACE] 11:53:27.333 terminal_windows.go:TerminalWidth() - 0s
[TRACE] 11:53:27.333 debug.go:PrintDebug() - 0s
[TRACE] 11:53:27.333 terminal.go:Flags() - 0s
@ArielLeslie ArielLeslie added the 🐛 bug Something isn't working label Nov 13, 2024
@JanDeDobbeleer
Copy link
Owner

@ArielLeslie on it in about an hour. I refactored this, but thought I validated this. Nonetheless, I'm going to solve this one asap.

@JanDeDobbeleer
Copy link
Owner

@ArielLeslie fixed and validated. This was a serious bug, thanks for reporting it so swiftly. I didn't notice it because I set my config using the internal API 🤦🏻

@ArielLeslie
Copy link
Author

Thanks for the fast patch! Everything looks pretty again!

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants