mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 11:59:40 -08:00
refactor: create inline function inWSLSharedDrive
This commit is contained in:
parent
21ecfa47e0
commit
7984365f1d
|
@ -272,8 +272,8 @@ func (g *git) getStatusColor(defaultValue string) string {
|
|||
|
||||
func (g *git) getGitCommandOutput(args ...string) string {
|
||||
inWSLSharedDrive := func(env environmentInfo) bool {
|
||||
return env.isWsl() && strings.HasPrefix(env.getcwd(), "/mnt/")
|
||||
}
|
||||
return env.isWsl() && strings.HasPrefix(env.getcwd(), "/mnt/")
|
||||
}
|
||||
gitCommand := "git"
|
||||
if g.env.getRuntimeGOOS() == windowsPlatform || inWSLSharedDrive(g.env) {
|
||||
gitCommand = "git.exe"
|
||||
|
|
Loading…
Reference in a new issue