-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows MK_WRONG_BINARY_WSL even when not in powershell #10689
Comments
@trixnz are u trying to run the Linux Binary ? or the .exe ? we do NOT reocmmend running the linux binary on windows. do u mind trying with minkube.exe Binary and see if u get the same error ? |
This is being run with the Windows minikube binary acquired via chocolatey. I'm not interacting with WSL in any capacity. |
thats interesting ! this is our logic for WSL detection
in our integraiton tests on windows our tests never failed, I wonder why your machine has "WSLENV" env set ? is that something specific to your windows setup or many other users have same problem? (and a question for us is why our integraiton windows machines are not like that ?) @trixnz meanwhile I wonder does --force override the error for you ? |
another question @trixnz , does this work fine in Powershell ? (not cmd) ? (our integration tests runs in powershell) in-fact I think you might have discovered a minikube bug that I hope u help us get more information to fix it |
After looking at the envs being preserved through I think it's improper behaviour to check for
No, it errors that
|
@trixnz is right, it is definitely an issue with the However even in a regular PowerShell session, if you set the env var |
I can confirm that. The same thing is happening to me. Executing from the normal "Windows PowerShell" terminal is ok. When using PowerShell from Windows Terminal I get the error. |
I'm getting the same error. Have to set |
@mrehanabbasi do u mind sharing the content of WSLENV when it is not working? |
this is a regression and I would accept a PR that fixes this and it is unfortunate that WSLENV is set when there is no WSL |
@mrehanabbasi WSL_DISTRO_NAME |
The first two are empty. |
@mrehanabbasi do u mind sharing WSLENV inside WSL itself ? |
@medyagh In WSL itself, the following are set:
|
Article by Microsoft: https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows/ Based on reading that, they're recommending people to set the WSLENV (if needed), which based on my testing breaks all non-WSL instances, so checking if this variable is set to indicate WSL is not recommended. I'll remove the |
I did some research on |
Tested the above PR in Windows Terminal before and after and fixed the issue on my machine. |
Just came here to say I'm getting the error too. Using the Windows executable inside PowerShell.
|
How do i get those variables? |
@NatsumiHB here is the PR that fixes this issue #10711 |
works perfectly now for me. thanks! 😄 minikube v1.18.0 on Microsoft Windows 10 Pro 10.0.19042 Build 19042 |
@NatsumiHB we release v1.18.1 https://github.com/kubernetes/minikube/releases/tag/v1.18.1 and it includes the fix. please update the minikube version https://minikube.sigs.k8s.io/docs/start/ |
@medyagh Yep, that version fixes it! |
@medyagh v1.18.1 works for me. |
The offending function below is incorrectly assuming that if
WSLENV
has a non-empty value, that the shell is an WSL shell. According to this post, this environment variable is used for sharing variables into new WSL sessions, and is set within Windows too.minikube/pkg/minikube/driver/driver.go
Lines 174 to 176 in 51ec098
Steps to reproduce the issue:
WSLENV
environment variable has a non-empty value. Mine isWT_SESSION::WT_PROFILE_ID
minikube
from a regular Windowscmd.exe
shellThe text was updated successfully, but these errors were encountered: