From dbcfab3480540e0a707ae7e8a93b59524cd7b4f4 Mon Sep 17 00:00:00 2001 From: "L. Yeung" Date: Thu, 18 Aug 2022 22:23:33 +0800 Subject: [PATCH] fix(pwsh): check presence of "posh-git" module --- src/shell/scripts/omp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index b6b947bb..50589999 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -26,7 +26,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock { $env:POSH_THEME = (Resolve-Path -Path ::CONFIG::).ProviderPath } # specific module support (disabled by default) - if ($null -eq $env:POSH_GIT_ENABLED) { + if (($null -eq $env:POSH_GIT_ENABLED) -or ($null -eq (Get-Module 'posh-git'))) { $env:POSH_GIT_ENABLED = $false }