-
Notifications
You must be signed in to change notification settings - Fork 46
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
Environment variables are not expanded in "ruff.path" VSCode settings #448
Comments
I'm unsure where VS Code retrieves the environment variables from. Is it possible that the environment variable isn't defined in the environment where VS Code is launched? Could you try opening VS Code via the shell in which the environment variable is defined (like |
Ok, that actually doesn't work either. |
I looked into this a bit more and it seems that the extension only substitutes certain variables which I assume is just a side effect of inheriting from the Python extension template: ruff-vscode/src/common/settings.ts Lines 59 to 79 in 332b4de
|
Ruff: 0.3.7
VSCode: 1.88.0
OS: Ubuntu 22.04
Python: 3.11.8
If I specify a path to a custom ruff executable containing environment variables:
I get the following error message:
Interpreter executable (/workspace/dist/export/python/virtualenvs/ruff/${env:PYTHON_VERSION}/bin/ruff) not found
Seems like predefined variables are expanded, but not the environment variables.
Related to #413.
Thank you.
The text was updated successfully, but these errors were encountered: