-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Explain how to disable autoloading of .env file in Python environment docs #6967
Comments
@gmeligio Thanks! Checking with the Python extension team about this. |
@gmeligio Update from the team: if you want to disable the behavior of automatically using In "python.envFile": "" As for the other item, the team will update the wiki. |
Thank you so much, @ntrogh, for looking into this. It looks neat to leave it empty to disable it. |
This gave me a lot of issues with my env vars in Docker compose setup running it from VSCode shell 🤦♀️ |
Hi @ntrogh . Is it possible to update the Affected Webpages with the suggested solution and examples? I think this issue is less accessible to users needing that documentation.
|
The Python environments in VS Code docs say
This explains how to change the file path to load but doesn't explain how to disable it. The use case is that sometimes is undesired to load the .env file.
There is a possible solution already that could be documented to guide users on how to disable it if they want. It's to change the default path
"${workspaceFolder}/.env"
to an unexistent path. This is how I disable it in my case:An snippet like this could be shown in the relevant webpages and it would be really helpful.
Another small related issue is that there is no link in "Show environment contributions" to Environment variable definitions file . Then, it's hard to connect the "terminal environment contributions" feature with the settings influencing it. This will be solved with #6590.
Affected Webpages
envFile
in table: https://code.visualstudio.com/docs/python/settings-reference#_general-python-settingsThe text was updated successfully, but these errors were encountered: