-
Notifications
You must be signed in to change notification settings - Fork 53
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
How to specify config file location using environment variable? #604
Comments
I think the settings in your version 2 should work except that the value in "ruff.lint.args": ["--config=${env:USERPROFILE}/pyproject.toml"],
"ruff.format.args": ["--config=${env:USERPROFILE}/pyproject.toml"], |
I updated to what you have. I still see the problem:
In file explorer, I have verified that |
Could it be that the environment variable itself isn't available in that environment where VS Code is opened? Because, I think |
I don't think so (but it's not impossible). If I open a terminal inside of VSCode I can access it (where as if you open VSCode, then create an environment variable, and then open a terminal, that variable will NOT be present). |
Background: In most of my projects I have a
pyproject.toml
file that has the linting rules I use. I want to be able to use a similar file in my IDE settings so that unless overwritten by a project file, I use standard RUFF rules. The complication is that I sync mysettings.json
file accross many different computers, so having a "proper" absolute path will not work for me; I need to be able to use environment variables (or at least know where the "default" path is.None of these seem to work.
I get the following error:
The text was updated successfully, but these errors were encountered: