mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -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 {
|
func (g *git) getGitCommandOutput(args ...string) string {
|
||||||
inWSLSharedDrive := func(env environmentInfo) bool {
|
inWSLSharedDrive := func(env environmentInfo) bool {
|
||||||
return env.isWsl() && strings.HasPrefix(env.getcwd(), "/mnt/")
|
return env.isWsl() && strings.HasPrefix(env.getcwd(), "/mnt/")
|
||||||
}
|
}
|
||||||
gitCommand := "git"
|
gitCommand := "git"
|
||||||
if g.env.getRuntimeGOOS() == windowsPlatform || inWSLSharedDrive(g.env) {
|
if g.env.getRuntimeGOOS() == windowsPlatform || inWSLSharedDrive(g.env) {
|
||||||
gitCommand = "git.exe"
|
gitCommand = "git.exe"
|
||||||
|
|
Loading…
Reference in a new issue