-
Notifications
You must be signed in to change notification settings - Fork 288
Add support for .env file #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for .env file #1497
Conversation
|
PR description:
should the line read: "If .env file is used" ? |
seantleonard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions
updated
seantleonard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some additional suggestions.
ayush3797
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits. LGTM otherwise!
Aniruddh25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.