revert(posh-git): add switch to avoid calling git status

resolves #2086
This commit is contained in:
Jan De Dobbeleer 2022-04-15 20:57:47 +02:00 committed by Jan De Dobbeleer
parent ae5a6f6136
commit 746b9ad77e

View file

@ -59,7 +59,7 @@ function global:Get-PoshContext {
}
function global:Initialize-ModuleSupport {
if ($GitPromptSettings.EnablePromptStatus) {
if ($env:POSH_GIT_ENABLED) {
$global:GitStatus = Get-GitStatus
$env:POSH_GIT_STATUS = Write-GitStatus -Status $global:GitStatus
}