Closed OnkelTem closed 2 years ago
That's correct. You need to move your validation to after the call to load. The validation immediately performs assertions about the current state of your environment, not about the env file. :)
Hehe, I can't imagine how it worked in the original code :)
I use a third-party project which fails to run, because it cannot find variables from my
.env
file.I found this code:
which raises exception in the second line, so the
load()
method has no chance to be called.I wonder how it was supposed to work?