godotenv
godotenv copied to clipboard
Variable substitution using real environment variable fallbacks
https://github.com/joho/godotenv/pull/54 introduced a change that meant substitution of variables from the real environment (i.e. not that derived from .env itself) was possible.
It looks like https://github.com/joho/godotenv/pull/58 removed this behaviour, in particular the deletion of os.LookupEnv - https://github.com/joho/godotenv/pull/58/files#diff-224f281bd0a4cfe0e7dcb394e8c7a585L299. Unfortunately it isn't clear from the PR if that was intended. Any chance someone can clarify?
Also needing this functionality back..
@nick-jones @andrewmclagan well 1 year later, I had the same need in my project.
I created https://github.com/joho/godotenv/issues/102.
For now I am using https://github.com/fireworkweb/godotenv (my fork) where I returned the behaviour.
Just registering this here in case someone stumbles upon this issue and then can check the latest on this.
@fabriciojs :+1: there is also #72 and #88. Unfortunately no word from @joho on this.
Hey @fabriciojs we're looking for similar functionality, but where it is able to read environment variables from os.Getenv if the variable in the file has not been defined, like https://github.com/fireproofsocks/dotenvy/blob/main/docs/dotenv-file-format.md#interpolation-aka-variable-substitution.
Is this something that you would be able to update in your fork? (or @joho)
Thanks!
#135 and #149 also relate to this.
This is clearly an issue users care about, with so many issues and PRs open regarding it.
@joho any specific reason for this not to be addressed?