fix(environment): check WSL shared path correctly

This commit is contained in:
L. Yeung 2022-08-30 16:43:50 +08:00 committed by Jan De Dobbeleer
parent 0b77995d80
commit f04e22a5d1

View file

@ -102,7 +102,7 @@ func (env *ShellEnvironment) InWSLSharedDrive() bool {
return false
}
windowsPath := env.ConvertToWindowsPath(env.Pwd())
return !strings.HasPrefix(windowsPath, `\\wsl.localhost`)
return !strings.HasPrefix(windowsPath, `//wsl.localhost`) && !strings.HasPrefix(windowsPath, `//wsl$`)
}
func (env *ShellEnvironment) ConvertToWindowsPath(path string) string {