JanDeDobbeleer / oh-my-posh

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

oh-my-posh (7.70.1/7.71.0) not working after update from scoop #2145

Closed DanSM-5 closed 2 years ago

DanSM-5 commented 2 years ago

Code of Conduct

What happened?

Updated oh-my-posh from scoop scoop update oh-my-posh. After that oh-my-posh stop working. The init command runs without errors but the prompt stays PS>.

I tried yesterday (03/24/22) and version was v7.70.1 and today v7.71.0 (04/24/22) with the same result.

My previous working version is v7.18.0

I used to use this to initialize on v7.18.0

oh-my-posh --init --shell pwsh --config "C:\Users\danie\scoop\apps\oh-my-posh\current\themes\jandedobbeleer.omp.json" | Invoke-Expression

Looking at the documentation it looks like the command has changed. For v7.70.1 and v7.71.0 I changed it to:

oh-my-posh init pwsh --config "C:\Users\danie\scoop\apps\oh-my-posh\current\themes\jandedobbeleer.omp.json" | Invoke-Expression

but still I haven't got it to work.

The theme looks correct. I tested the path and it finds the json correctly.

echo $env:POSH_THEME
C:\Users\danie\scoop\apps\oh-my-posh\current\themes\jandedobbeleer.omp.json

I have no hurries to update, I can go back to 7.18.0 which is working for me, but I'd like to find the cause of this for future installations.

Theme

jandedobbeleer.omp.json

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 7.71.0

Segments:

ConsoleTitle(true)   -   0 ms - pwsh in ~
session(true)        -   0 ms -  danie 
path(true)           -   0 ms -    ~ 
git(false)           -  32 ms - 
node(false)          -   0 ms - 
go(false)            -   0 ms - 
julia(false)         -   0 ms - 
python(false)        -   3 ms - 
ruby(false)          -   0 ms - 
azfunc(false)        -   0 ms - 
aws(false)           -   0 ms - 
root(false)          -   0 ms - 
executiontime(true)  -   0 ms -  ﮫ0ms⠀
exit(true)           -   3 ms -   
shell(true)          -   0 ms -   pwsh 
ytm(false)           -  28 ms - 
battery(true)        -  11 ms -   100 
time(true)           -   0 ms -  19:20:21 

Run duration: 82.9694ms

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

Logs:

2022/04/24 19:20:21 Flags duration: 0s, args: 
2022/04/24 19:20:21 Flags duration: 0s, args: 
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/04/24 19:20:21 Root duration: 0s, args: 
2022/04/24 19:20:21 Shell duration: 0s, args: 
2022/04/24 19:20:21 ErrorCode duration: 0s, args: 
2022/04/24 19:20:21 IsWsl duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 debug: User
danie
2022/04/24 19:20:21 User duration: 0s, args: 
2022/04/24 19:20:21 debug: Host
Snipper-Ghost
2022/04/24 19:20:21 Host duration: 0s, args: 
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: SSH_CONNECTION
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: SSH_CLIENT
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 Flags duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 IsWsl duration: 0s, args: 
2022/04/24 19:20:21 StackCount duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 HasCommand duration: 32.8449ms, args: git.exe
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 error: HasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/04/24 19:20:21 HasParentFilePath duration: 0s, args: .git
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 77.5Γö¼Γòís, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 debug: HasFiles
false
2022/04/24 19:20:21 HasFiles duration: 1.2752ms, args: *.py
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 debug: HasFiles
false
2022/04/24 19:20:21 HasFiles duration: 1.8301ms, args: *.ipynb
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 debug: HasFiles
false
2022/04/24 19:20:21 HasFiles duration: 505.6Γö¼Γòís, args: pyproject.toml
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 PathSeparator duration: 0s, args: 
2022/04/24 19:20:21 debug: HasFiles
false
2022/04/24 19:20:21 HasFiles duration: 114.2Γö¼Γòís, args: venv.bak
2022/04/24 19:20:21 debug: HasFolder
false
2022/04/24 19:20:21 HasFolder duration: 0s, args: .venv
2022/04/24 19:20:21 debug: HasFolder
false
2022/04/24 19:20:21 HasFolder duration: 0s, args: venv
2022/04/24 19:20:21 debug: HasFolder
false
2022/04/24 19:20:21 HasFolder duration: 0s, args: virtualenv
2022/04/24 19:20:21 debug: HasFolder
false
2022/04/24 19:20:21 HasFolder duration: 0s, args: env
2022/04/24 19:20:21 debug: HasFolder
false
2022/04/24 19:20:21 HasFolder duration: 0s, args: venv-win
2022/04/24 19:20:21 debug: HasFolder
false
2022/04/24 19:20:21 HasFolder duration: 0s, args: pyenv-win
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: AWS_VAULT
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: AWS_PROFILE
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: AWS_REGION
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: AWS_DEFAULT_REGION
2022/04/24 19:20:21 debug: Getenv

2022/04/24 19:20:21 Getenv duration: 0s, args: AWS_CONFIG_FILE
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 error: FileContent
open C:\Users\danie/.aws/config: The system cannot find the path specified.
2022/04/24 19:20:21 FileContent duration: 570.7Γö¼Γòís, args: C:\Users\danie/.aws/config
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 Root duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 ExecutionTime duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 ErrorCode duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 Shell duration: 0s, args: 
2022/04/24 19:20:21 Flags duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 error: HTTPRequest
Get "http://127.0.0.1:9863/query": context deadline exceeded
2022/04/24 19:20:21 HTTPRequest duration: 28.2501ms, args: http://127.0.0.1:9863/query
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 IsWsl duration: 0s, args: 
2022/04/24 19:20:21 BatteryInfo duration: 8.868ms, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Pwd
C:\Users\danie
2022/04/24 19:20:21 Pwd duration: 0s, args: 
2022/04/24 19:20:21 debug: Home
C:\Users\danie
2022/04/24 19:20:21 GOOS duration: 0s, args: 
2022/04/24 19:20:21 TemplateCache duration: 0s, args: 
2022/04/24 19:20:21 debug: Getenv
C:\Users\danie\AppData\Local
2022/04/24 19:20:21 Getenv duration: 0s, args: LOCALAPPDATA
2022/04/24 19:20:21 CachePath duration: 0s, args:
JanDeDobbeleer commented 2 years ago

@DanSM-5 set $global:POSH_TRANSIENT=$false before initializing oh-my-posh. Fixing that today.

DanSM-5 commented 2 years ago

I tried width $global:POSH_TRANSIENT=$false but it still didn't work although I found the cause. I used to have $env:POSH_GIT_ENABLED = $true and that was causing the prompt not to appear.

image

It looks like it is no longer needed (I can see git info on a repo) but it is still in the documentation. I'm leaving this comment for anyone that get the same error.

astridos2go commented 2 years ago

I had the same issue, and installed from winget.

Removing $env:POSH_GIT_ENABLED = $true from my PowerShell profile fixed this issue.

JanDeDobbeleer commented 2 years ago

@astridos2go @DanSM-5 at one time you both must've had posh-git installed. With it gone, that no longer works as enabling it doesn't validate the existence as that's a very timely call (which is why the env var is in place).

github-actions[bot] commented 7 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.