oh-my-posh: oh-my-posh wont start in powershell

Code of Conduct

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

What happened?

Hi,

i have install oh my posh but when i try to start it by reload by run . $PROFILE in the PowerShell wont reload with new Themes instead i look like this:

image

When i check the Windows event log i get this error:

Faulting application name: conhost.exe, version: 10.0.19041.1566, time stamp: 0x56b24be3 Faulting module name: conhost.exe, version: 10.0.19041.1566, time stamp: 0x56b24be3 Exception code: 0xc0000409 Fault offset: 0x000000000001e7ff Faulting process id: 0x2a04 Faulting application start time: 0x01d86f3718d34fbc Faulting application path: C:\Windows\system32\conhost.exe Faulting module path: C:\Windows\system32\conhost.exe Report Id: 4a0005c9-5d46-44b1-ba7f-d7c5368adb14 Faulting package full name: Faulting package-relative application ID:

Theme

Im using:

[JanDeDobbeleer](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/jandedobbeleer.omp.json)

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

PS>oh-my-posh debug

Version: 7.90.0

Segments:

ConsoleTitle(true) -   0 ms - powershell in ~
session(true)  -   0 ms -  ollesson 
path(true)     -   0 ms -   ~
git(false)     -  11 ms -
root(false)    -   0 ms -
exit(true)     -   1 ms -   
node(false)    -   0 ms -
go(false)      -   0 ms -
python(false)  -   0 ms -
shell(true)    -   0 ms - in powershell
time(true)     -   0 ms - at 08:27:22

Run duration: 28.9412ms

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

Config path: C:\Users\ollesson\AppData\Local\oh-my-posh\config.omp.json

Logs:

2022/05/24 08:27:22 debug: Getenv
C:\Users\ollesson\AppData\Local
2022/05/24 08:27:22 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/24 08:27:22 CachePath duration: 500.1µs, args:
2022/05/24 08:27:22 debug: Getenv
C:\Users\ollesson\AppData\Local\oh-my-posh\config.omp.json
2022/05/24 08:27:22 Getenv duration: 0s, args: POSH_THEME
2022/05/24 08:27:22 Shell duration: 10.7582ms, args:
2022/05/24 08:27:22 resolveConfigPath duration: 10.7582ms, args:
2022/05/24 08:27:22 Init duration: 11.2583ms, args:
2022/05/24 08:27:22 Flags duration: 0s, args:
2022/05/24 08:27:22 config.loadConfig duration: 1.0812ms, args:
2022/05/24 08:27:22 Flags duration: 0s, args:
2022/05/24 08:27:22 debug: Getenv

2022/05/24 08:27:22 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/05/24 08:27:22 Root duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 ErrorCode duration: 0s, args:
2022/05/24 08:27:22 IsWsl duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 debug: User
ollesson
2022/05/24 08:27:22 User duration: 0s, args:
2022/05/24 08:27:22 debug: Host
ALLSUP-5HH94J3
2022/05/24 08:27:22 Host duration: 0s, args:
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 498.6µs, args:
2022/05/24 08:27:22 Flags duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 debug: Getenv

2022/05/24 08:27:22 Getenv duration: 0s, args: SSH_CONNECTION
2022/05/24 08:27:22 debug: Getenv

2022/05/24 08:27:22 Getenv duration: 0s, args: SSH_CLIENT
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 Flags duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 IsWsl duration: 0s, args:
2022/05/24 08:27:22 StackCount duration: 0s, args:
2022/05/24 08:27:22 DirIsWritable duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 HasCommand duration: 11.0012ms, args: git.exe
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 error: HasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/05/24 08:27:22 HasParentFilePath duration: 0s, args: .git
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 Root duration: 502.3µs, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 ErrorCode duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 Flags duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 debug: HasFiles
false
2022/05/24 08:27:22 HasFiles duration: 0s, args: *.py
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 debug: HasFiles
false
2022/05/24 08:27:22 HasFiles duration: 0s, args: *.ipynb
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 debug: HasFiles
false
2022/05/24 08:27:22 HasFiles duration: 501.4µs, args: pyproject.toml
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 PathSeparator duration: 0s, args:
2022/05/24 08:27:22 debug: HasFiles
false
2022/05/24 08:27:22 HasFiles duration: 0s, args: venv.bak
2022/05/24 08:27:22 debug: HasFolder
false
2022/05/24 08:27:22 HasFolder duration: 0s, args: .venv
2022/05/24 08:27:22 debug: HasFolder
false
2022/05/24 08:27:22 HasFolder duration: 0s, args: venv
2022/05/24 08:27:22 debug: HasFolder
false
2022/05/24 08:27:22 HasFolder duration: 0s, args: virtualenv
2022/05/24 08:27:22 debug: HasFolder
false
2022/05/24 08:27:22 HasFolder duration: 0s, args: env
2022/05/24 08:27:22 debug: HasFolder
false
2022/05/24 08:27:22 HasFolder duration: 0s, args: venv-win
2022/05/24 08:27:22 debug: HasFolder
false
2022/05/24 08:27:22 HasFolder duration: 0s, args: pyenv-win
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 Flags duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 debug: Pwd
C:\Users\ollesson
2022/05/24 08:27:22 Pwd duration: 0s, args:
2022/05/24 08:27:22 debug: Home
C:\Users\ollesson
2022/05/24 08:27:22 GOOS duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 TemplateCache duration: 0s, args:
2022/05/24 08:27:22 Shell duration: 0s, args:
2022/05/24 08:27:22 debug: Getenv
C:\Users\ollesson\AppData\Local
2022/05/24 08:27:22 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/24 08:27:22 CachePath duration: 0s, args:
2022/05/24 08:27:22 Flags duration: 0s, args:

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (19 by maintainers)

Commits related to this issue

Most upvoted comments

@JanDeDobbeleer reinstall my Computer with windows 11 and thane i fund what cause this it what Cisco AMP for endpoints, and now is all working again 😃

@JanDeDobbeleer 7.91.3 appears to work. Thanks!

(I’m on my personal machine right now but was able to confirm 7.91.2 does not work on it, whereas 7.91.3 does, so I’m confident that fixed it.)

@JanDeDobbeleer not working for me 😦 I will probably upgrade to windows 11 and hope this will solve my problem.

thanks for any help 😃

I am seeing a similar issue where the prompt isn’t coming up.

I traced it to release 7.85.4 and the addition of a function Test-PSDebugContext outside the New-Module block in the dynamically generated module. It looks like the prompt function needs that function to stay around but by default doesn’t do so, at least on my machine.

Output of oh-my-posh init pwsh --print: