mirror of
https://github.com/cmderdev/cmder.git
synced 2025-11-09 13:49:05 +08:00
Restore posh-git support for all versions in Import-Git
Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
2
vendor/psmodules/Cmder.ps1
vendored
2
vendor/psmodules/Cmder.ps1
vendored
@@ -176,8 +176,10 @@ function Import-Git {
|
|||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Import posh-git module (works for all versions)
|
||||||
Import-Module Posh-Git -ErrorAction SilentlyContinue | Out-Null
|
Import-Module Posh-Git -ErrorAction SilentlyContinue | Out-Null
|
||||||
|
|
||||||
|
# Apply version-specific settings for posh-git 1.0.0+
|
||||||
if (($gitModule.Version -ge [version]"1.0.0") -and (Get-Variable -Name GitPromptSettings -ErrorAction SilentlyContinue)) {
|
if (($gitModule.Version -ge [version]"1.0.0") -and (Get-Variable -Name GitPromptSettings -ErrorAction SilentlyContinue)) {
|
||||||
$GitPromptSettings.AnsiConsole = $false
|
$GitPromptSettings.AnsiConsole = $false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user