-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Process tasks can attempt to execute directories on Linux #158914
Comments
Maybe related to #158666 |
#158666 is somewhat related, however, the two issues come from separate parts of the code. This problem comes from the The PR will somewhat improve the situation, because this error will be caught slightly earlier, so it will say: |
Any news on this? Vscode currently doesn't follow usual executable resolution which can be really confusing for users. |
Slightly simpler reproduction instructions:
Expected behaviour: python version is printed I've opened a PR with a patch: #228373. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
PATH
, e.g. this minimal extension runningpython
~/.local/bin/python
This is because the default function used by the findExecutable function does not check whether something is a file or a directory, but only that it exists:
vscode/src/vs/platform/terminal/node/terminalEnvironment.ts
Line 27 in 68cda09
This was fixed for win32.findExecutable in 9bc292a and 52daded, where directories are ignored when searching PATH. However, as these functions are in separate files, the other one missed out on this fix.
Ideally these two functions should be merged as they perform pretty much the same job, and it would avoid this problem in the future. It might be worth considering making task behaviour consistent between platforms in terms of at which point executable paths are resolved, as that seems to be why we ended up with two implementations in the first place.
The text was updated successfully, but these errors were encountered: