Skip to content

Commit

Permalink
refactor: create inline function inWSLSharedDrive
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Bourdon authored and JanDeDobbeleer committed Mar 10, 2021
1 parent 21ecfa4 commit 7984365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/segment_git.go
Expand Up @@ -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"
Expand Down

0 comments on commit 7984365

Please sign in to comment.