Open piotr-kubiak opened 3 weeks ago
The regular assignments are processed in SetEnv.__init__
, while the file assignments happen in use_replacer, which is called during by build()
. Would we be OK with loading these at the same time, either in the __init__
or somewhere further down the line? To me, that seems like the easiest way to make sure that order of the assignments is taken into account, and I'm leaning toward putting them all in the __init__
, but doing so feels like we'd be making the constructor "bulky".
I also just started looking at this code, so I am not sure if there was a reason that the env files are loaded after. Original PR
When not using
file|
inset_env
, the variables are assigned in order (with the last value replacing any previous one, as inFOO
being overwriten withQUX
in myexample1
).However, this behaviour is not consistent when using
file|
, when assingment of variables fromfile
always take precedence (seeexample2
, whereFOO
gets the valueBAR
from.env
, and is not overwriten by subsequent assignment ofQUX
).Expected:
file|
file|
.tox.ini:
.env:
Output: