diff --git a/src/environment/shell_unix.go b/src/environment/shell_unix.go index 3060fbca..d715be52 100644 --- a/src/environment/shell_unix.go +++ b/src/environment/shell_unix.go @@ -98,7 +98,11 @@ func (env *ShellEnvironment) WindowsRegistryKeyValue(path string) (*WindowsRegis } func (env *ShellEnvironment) InWSLSharedDrive() bool { - return env.IsWsl() && strings.HasPrefix(env.Pwd(), "/mnt/c") + if !env.IsWsl() { + return false + } + windowsPath := env.ConvertToWindowsPath(env.Pwd()) + return !strings.HasPrefix(windowsPath, `\\wsl.localhost`) } func (env *ShellEnvironment) ConvertToWindowsPath(path string) string {