-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Shell doesn't support Cygwin zsh #17426
Comments
@edemaine You have to set logging level to
|
Thanks for the tip! I tried |
Oops, thanks again. Now there are relevant log messages (added to original post). |
Looks like we might need to add
|
Nice spot. I'm happy to make a PR to expand the shell detection, and that should fix issue 1. Any idea why issue 2 arises? Why does it run one shell (the unrecognized zsh), and not the shell given by |
@karrtikr Is issue 2 due to python extension or VS Code? |
It seems like it's us. Looking at the logs VSCode correctly identifies the shell
And we add the vscode-python/src/client/common/terminal/helper.ts Lines 62 to 70 in 31ce50c
Seems like a bug that we somehow still add |
Strip `.exe` extension before detecting shells, so all detections work in Windows / Cygwin. Fixes part of microsoft#17426.
Actually, I think what's going on is that my shell is detected as type "other", so VSCode falls back to using a default for Windows. The logs say:
The fact that vscode-python/src/client/common/terminal/shellDetector.ts Lines 51 to 62 in 31ce50c
What's weird is that it doesn't actually run the shell returned from But this actually seems to be how |
Ah, thanks for diagnosing the issue! The issue is we shouldn't fallback on using other detectors once VSCode has identified a terminal type as other. Other shell detectors were in place before when we added the VSCode shell detector, which reliably tells us the shell path so we need not guess. We have an open issue #16023 to remove all other shell detectors which should solve this 🙂 You're very welcome to work on it if you would like. |
@edemaine can you verify that this issue is fixed in the insider build? All you have to do is set the following setting: |
@TylerLeonhardt I verified just now :) |
I confirmed as well. 🥳 |
A possible addition to #4568:
When using Cygwin's
zsh
as my shell, the extension sends the PowerShell command& "C:/Program Files/Python39/python.exe" c:/Users/edemaine/.../filename.py
.zsh
doesn't understand the leading&
. Relevant configuration:When using Cygwin's
zsh
as my shell and Windowscmd
as my automation shell, the extension runs Python inzsh
(and then runs the PowerShell command):I'm confused by this one because I thought it was fixed in a recent update (last week). But now it seems to be broken again.
Environment data
python.languageServer
setting: DefaultLogs
Output for
Python
in theOutput
panel (in the second scenario above)Notably, I don't notice any shell identification logs from baseShellDetector. Does this code not get run on Windows?The text was updated successfully, but these errors were encountered: