Merge pull request #2591 from koaleksa/fix-posh-git-1.0.0

Fix Posh-Git 1.0.0 import and console.
This commit is contained in:
Dax T Games 2021-09-10 12:28:33 -04:00 committed by GitHub
commit 5b071d8d59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,10 @@ function Import-Git(){
if($GitModule | select version | where version -le ([version]"0.6.1.20160330")){
Import-Module Posh-Git > $null
}
if($GitModule | select version | where version -ge ([version]"1.0.0")){
Import-Module Posh-Git > $null
$GitPromptSettings.AnsiConsole = $false
}
if(-not ($GitModule) ) {
Write-Warning "Missing git support, install posh-git with 'Install-Module posh-git' and restart cmder."
}