You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown in the python-dotenv docs, default is to not override env variables, in other words in python-dotenv the .env variables can be overridden by exporting a variable into the current environment.
With python-dotenv you can do load_dotenv(override=True) when you want .env file to override. Unfortunately, the poetry-dotenv doesn't allow the user to manage this aspect, its always going to override.
I think this is unexpected behavior for people who use python-dotenv.
Is there a way to set the poetry dotenv plugin to stop overriding existing environment variables?
The text was updated successfully, but these errors were encountered:
I agree that if you're coming from vanilla python-dotenv then this is unexpected. That needs to be reconciled with the expectations of anyone coming from pipenv. My proposal to resolve this is a system environment variable—POETRY_DOTENV_DONT_OVERRIDE—which is being added with #16. I think it should solve most cases. Most users who want it to behave like python-dotenv's defaults probably want that everywhere and the same for anyone who wants it to behave like pipenv.
The default behavior of this plugin is to override the existing env variables, unlike the default in python-dotenv.
As shown in the python-dotenv docs, default is to not override env variables, in other words in python-dotenv the
.env
variables can be overridden by exporting a variable into the current environment.With python-dotenv you can do
load_dotenv(override=True)
when you want.env
file to override. Unfortunately, the poetry-dotenv doesn't allow the user to manage this aspect, its always going to override.I think this is unexpected behavior for people who use python-dotenv.
Is there a way to set the poetry dotenv plugin to stop overriding existing environment variables?
The text was updated successfully, but these errors were encountered: