Open maxmelamed opened 2 years ago
One thing to note is that'd be a breaking change, since currently the inverse would work (putting .env.test
first) and if you make that change, this will no longer be true. A possible solution is to make this a documented behavior (to list env files in reverse).
Hey there! I'm using this plugin and I've noticed the following behavior, which is somewhat confusing. If I have my pytest-dotenv config as follows:
then I end up with
FOOBAR=5
. I understand this can be fixed withenv_override_existing_values=1
, but the docs seem to suggest that this is intended for overriding existing env vars in the current process, rather than env vars in a previously listed file. In my opinion, it would make sense to overwrite values from previously specified env files by default, while leavingenv_override_existing_values=1
for deciding whether or not existing env vars in the process should be overwritten.I'd be happy to open a PR if the proposed behavior makes sense.