dbmate
dbmate copied to clipboard
Support env.local, et al. or support `--envfile` CLI option
dbmate does not support additional .env
files, e.g. .env.local
or .env.development.local
due to https://github.com/joho/godotenv/issues/10
Possible solutions of varying completeness:
- Have
loadDotEnv
also load.env.local
- Add
--envfile
option which specifies file forgodotenv.Load()
- Use a fork of godotenv which implements https://github.com/joho/godotenv/issues/10
I also would like this issue supported
Happy to accept a PR for this, I think it would only be a few lines of code
I haven't written any go code, but if this is still sitting open in a week or two, I may give it a try.
Also, if anyone does write a pr, I would definitely prefer the solution of
Add
--envfile
option which specifies file forgodotenv.Load()
I'd love this too.
Looks like something like godotenv.Load(".env.local")
is supported.