Replies: 1 comment
-
Hey if you augment your example like this you will see something consistent with the document:
.env:
output:
As you can see VAR_X does pick up the .env file defined variables. There is an experiment in the latest version that alters these orders, which in my opinion is dangerous. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, if you have:
The
ENV
variable in this case is picked up from the command line or the valuedefault_env
is used otherwise, this is great. However, ifVAR_X
is set within.env
file, then it is not picked up and the value will always be123
due to thedefault
; it would have to be set on the command line for it to be picked up.Setting on the command line should take precedence, I think, but otherwise loading from a dotenv file next would be great.
I think there might be a chicken-and-egg situation such that the env vars need to be evaluated in order to select the correct dotenv file but maybe after loading dotenv the env vars defined in the
env:
section could be re-evaluated?Thanks for a great tool, finding it really useful so far!
Beta Was this translation helpful? Give feedback.
All reactions