Add support for .env file#1497
Conversation
|
PR description:
should the line read: "If .env file is used" ? |
updated
seantleonard
left a comment
There was a problem hiding this comment.
some additional suggestions.
ayush3797
left a comment
There was a problem hiding this comment.
Some nits. LGTM otherwise!
Aniruddh25
left a comment
There was a problem hiding this comment.
Not sure why we are testing DotNetEnv.Env.Load externally.
We have tests that verifies DotNetEnv.Env.Load internally. Line:125(Environment) we have some external tests as well to just verify the method Loading from .env file happens at the initialization step of DAB CLI, so that every cli command is synced with the environment variables. Hope this addresses your concerns? |
Thanks for the clarifications, could you comment the additional scenarios which this test is handling. |
Sure, For Example we are:
|
Why make this change?
.envfile read bydotenv.net#1374.envto manage environment variables during local development.What is this change?
.envto manage environment variables instead of setting environment variables in the system..envfile is used, it will take precedence over system environment variables.How was this tested?
NOTE:
QnA
Where should the
.envfile be created?-> For
.env fileto be considered, it should be present in the same directory where the dab commands are executed.Does it overwrite the existing environment variables?
-> No, it doesn't update any existing variables. It just gives precedence to the variable defined in the file over the system defined variable in case it is present in both places.