fix(wsl): look for existance of wslpath

resolves #3657
This commit is contained in:
Jan De Dobbeleer 2023-03-31 21:05:21 +02:00 committed by Jan De Dobbeleer
parent e6a99c5a52
commit 3f4f42cc09

View file

@ -39,8 +39,7 @@ func (env *Shell) IsWsl() bool {
defer func() {
env.Cache().Set(key, strconv.FormatBool(val), -1)
}()
version := env.FileContent("/proc/version")
val = strings.Contains(version, "microsoft")
val = env.HasCommand("wslpath")
env.Debug(strconv.FormatBool(val))
return val
}