-
Notifications
You must be signed in to change notification settings - Fork 505
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
feat: read pointed file of environment variables using github.com/joho/godotenv
#603
Conversation
7efba1d
to
0792b08
Compare
I have noticed that missing |
0792b08
to
a8033f0
Compare
Considered to expose option to read file pointed via |
.env
using github.com/joho/godotenv
github.com/joho/godotenv
…ho/godotenv` Defaulting to `.env` in the current directory. Skipping any error, including non-existing file or errors while parsing the file as no better options for now.
c7ad2e4
to
ac67cd0
Compare
@mfridman I have rebased this branch, please take a look. |
ac67cd0
to
d5ed18d
Compare
Related issue (and what this would close if merged) #329. I'm still not convinced this is necessary, could you describe why the goose package and CLI should understand how to read/parse .env or .envrc files, as opposed to letting the user set their ENV variables how they want? Afaics there are a lot of tools out there that do this well, e.g., https://direnv.net/, plain It should be up to the user to set their ENV variables, instead of every tool in existence reading these files. Maybe I'm missing something, but I'd like to understand why this is needed. |
@mfridman That is a good point indeed and makes me wonder as well. Me and many others most likely are used to have such capability embedded and being cross-platform from tools like docker compose https://docs.docker.com/compose/environment-variables/set-environment-variables/ I personally love organizing different environments in different files e.g.
then use goose to directly and seamlessly source from given env e.g.
or direclty symlinking the relevant environment I am working with
|
refs #347 (comment)
Defaulting to
.env
in the current directory.Skipping any error, including non-existing file or errors while parsing
the file as no better options for now.