add more checks for wsl
parent
276f99b551
commit
98d577d229
|
@ -136,8 +136,9 @@ func NeedsPortForward(name string) bool {
|
||||||
|
|
||||||
// isMicrosoftWSL will return true if process is running in WSL in windows
|
// isMicrosoftWSL will return true if process is running in WSL in windows
|
||||||
// checking for WSL env var based on this https://github.com/microsoft/WSL/issues/423#issuecomment-608237689
|
// checking for WSL env var based on this https://github.com/microsoft/WSL/issues/423#issuecomment-608237689
|
||||||
|
// also based on https://github.com/microsoft/vscode/blob/master/resources/win32/bin/code.sh#L24
|
||||||
func isMicrosoftWSL() bool {
|
func isMicrosoftWSL() bool {
|
||||||
return os.Getenv("WSL_DISTRO_NAME") != ""
|
return os.Getenv("WSL_DISTRO_NAME") != "" || os.Getenv("WSLPATH") != "" || os.Getenv("WSLENV") != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasResourceLimits returns true if driver can set resource limits such as memory size or CPU count.
|
// HasResourceLimits returns true if driver can set resource limits such as memory size or CPU count.
|
||||||
|
|
Loading…
Reference in New Issue