Replies: 1 comment
-
Ha! I just ran into this. I have .env and .env.secret (ignored). So I have a task that copies the keys from .env.secret to .env to document what is expected locally. So like
I expected dotenv files to be loaded in order, so of course that caused a problem. I changed the task to sync the secret env's as comments. Probably a better in any case, but still the ordering by task is counter intuitive. |
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
-
# .env A=1
# .env.local A=2
task test
outputs1
instead of2
. Isn't it counterintuitive that env variables from subsequent files do not override the ones from preceding? For instance, shell itself outputs2
forsource .env && source .env.local && echo "$A"
.Beta Was this translation helpful? Give feedback.
All reactions