mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 11:59:40 -08:00
fix: slow git status on wsl2
This commit is contained in:
parent
6ed5402ef6
commit
500cc5834d
|
@ -272,7 +272,7 @@ func (g *git) getStatusColor(defaultValue string) string {
|
|||
|
||||
func (g *git) getGitCommandOutput(args ...string) string {
|
||||
gitCommand := "git"
|
||||
if g.env.getRuntimeGOOS() == windowsPlatform {
|
||||
if g.env.getRuntimeGOOS() == windowsPlatform || (g.env.isWsl() && strings.HasPrefix(g.env.getcwd(), "/mnt/")) {
|
||||
gitCommand = "git.exe"
|
||||
}
|
||||
args = append([]string{"--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
|
||||
|
|
Loading…
Reference in a new issue