Closed MeikTranel closed 2 years ago
@MeikTranel what does $error
say?
Got it to work again - i think this is an issue already reported - at least i saw it somewhere:
The term 'Get-GitStatus' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
Get-GitStatus : The term 'Get-GitStatus' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:94 char:33
+ $global:GitStatus = Get-GitStatus
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-GitStatus:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
My profile still said $env:POSH_GIT_ENABLED = $true - git seems to be integrated in oh-my-posh without the poshgit integration now right? I did a restart and removed that line and fixed it. But maybe it should actually write out the error somewhere instead failing silently.
@MeikTranel unfortunately that's how PowerShell works 😅
True i know the struggle - my only question is how it is that i set POSH_GIT_ENABLED to $false, it then fixes the prompt but git status display still works:
Does Oh-my-posh support poshgit
but falls back to it's own implementation once POSH_GIT_ENABLED is $false?
If so wouldn't be possible to check if Get-Command Get-GitStatus
is available before using it so oh-my-posh has opportunity to print an error or skip the element?
@MeikTranel we did that in the past but the validation is timely and it slows down everything. Adding that check on $true is also error prone as there's no guarantee that's not forced to $true afterwards.
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.
Code of Conduct
What happened?
Oh-my-posh fails to render any theme even after reinstalling everything. Not even the default theme.
I uninstalled everything with winget, removed the old powershell module, deleted everything posh related on my machine.
Debug even shows that it tries to render everything correctly.
This might be something related to Windows Insider Beta Channel 22621.1 but i'm not sure (anyways thats the build currently going out to seekers on non-insider machines so we're gonna have to deal with it).
The issue seems to be unrelated to shell app itself since it happens in Terminal, VSCode etc.
It feels like its clearing all console output just after everything was printed to the shell.
Theme
Default/Ys/Agnoster/Custom
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output