From 98d577d22958e6370d194b46e16792705523b0a3 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 3 Jun 2020 14:47:43 -0700 Subject: [PATCH] add more checks for wsl --- pkg/minikube/driver/driver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/driver/driver.go b/pkg/minikube/driver/driver.go index c2adf3815..9f9705821 100644 --- a/pkg/minikube/driver/driver.go +++ b/pkg/minikube/driver/driver.go @@ -136,8 +136,9 @@ func NeedsPortForward(name string) bool { // 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 +// also based on https://github.com/microsoft/vscode/blob/master/resources/win32/bin/code.sh#L24 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. -- GitLab