Closed woha closed 2 years ago
@woha what does $error
say?
PS>$error
ErrorRecord : The term 'Get-GitStatus' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. CommandName : Get-GitStatus WasThrownFromThrowStatement : False TargetSite : System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSObject] Invoke(System.Collections.IEnumerable) Message : The term 'Get-GitStatus' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Data : {System.Management.Automation.Interpreter.InterpretedFrameInfo} InnerException : HelpLink : Source : System.Management.Automation HResult : -2146233087 StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) at System.Management.Automation.Runspaces.Pipeline.Invoke() at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options)
Get-GitStatus:
Line |
63 | $global:GitStatus = Get-GitStatus
| ~~~~~
| The term 'Get-GitStatus' is not recognized as a name of a cmdlet,
function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
PS>
On Wed, Apr 20, 2022 at 2:50 PM Jan De Dobbeleer @.***> wrote:
@woha https://github.com/woha what does $error say?
— Reply to this email directly, view it on GitHub https://github.com/JanDeDobbeleer/oh-my-posh/issues/2113#issuecomment-1103894806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECYWTYGIQKO2VVZLY7JMSLVF74SFANCNFSM5T34VZWQ . You are receiving this because you were mentioned.Message ID: @.***>
Looks like posh-git is missing / not loaded. But why is this causing an issue now and not in previous versions?
@JanDeDobbeleer Thank you very much for your help and immediate answer. You have a new sponsor now and GitKraken a new PRO customer!
@woha thanks! We only run Get-GitStatus when $env:POSH_GIT_ENABLED -eq $true
. Can it be that was somehow in your profile?
Yes, $env:POSH_GIT_ENABLED = $true is in my $PROFILE, but it's there "forever". Nevermind, I'm sure it's my fault. @JanDeDobbeleer Thank you again!
@woha yes, we only recently reintroduced that logic. It was away for a while which is why the issue reappeared on your end.
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?
After updating to the latest version (v7.66.0) oh-my-posh stopped working in pwsh on all my machines. Instead of the modified prompt, the default prompt ist shown (PS>).
Theme
$env:POSH_THEMES_PATH\jandedobbeleer.omp.json
What OS are you seeing the problem on?
Windows, macOS
Which shell are you using?
powershell
Log output