Shims from Windows messes up with WSL #10299
Unanswered
felipecrs
asked this question in
Troubleshooting and bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This problem is rather complex, so let me start with a reproduction:
In PowerShell:
I'm not sure what's the best way to fix this, but this is a super normal setup, I would say. I use Windows to develop native Windows applications while WSL to develop other ones.
Some thoughts:
Maybe mise and mise-shims Windows binaries should refuse to execute on WSL. That could be detected by inspecting the parent process, checking if it's
wsl.exeorwslhost.exe.But that isn't trivial.
Why do we need
.cmdor extension-less shims on Windows?The
.cmdshims are always problematic anyway. They don't work when called from UNC directories, and also ask to confirm the exit onCtrl+C.Not sure when someone would use it instead of the
.exeone.Not sure when someone would use the extension-less shim either.
If it's for Git Bash, Git Bash seems to correctly use the
.exewhen the command is invoked without extension:VS Code has it so that
codeinside WSL opens VS Code on Windows, which is a totally different use case.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions