-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
dotenv_config_path as environment variable itself [feature request] #351
Comments
What’s the real problem you’re trying to solve here? |
@maxbeatty here the two scenarios I had trouble with and I couldn't come up with a solution.
to dotenv.
This apply to any executables: expecting dotenv_config_path=value to be the first parameter of whatever the developer is working with/on is very obtrusive, while expecting a given ENV to be set is not and developer can opt-in dotenv without friction.
These are just my 2 cents on this, great package guys :) |
@maxbeatty regarding my pull request which I believe will also solve this issue, what more would you like to discuss? |
So far, the reasons to support preload configuration using environment variables:
Tools colliding and being incompatible is no fun so let’s try to make it better. What we’ll need:
|
Hi @maxbeatty, thanks for considering this fix. Note, I considered requiring that the env var versions of the config vars be uppercase but when I dumped my env vars I noticed that a lot of node default env vars are actually lower case despite what I thought was the convention of using uppercase, so I thought I'd leave it lowercase. I also considered allowing the user to use upper OR lower case and having the parser interpret it case insensitive to make it a bit friendlier. Currently it expects lowercase. I can change the PR if you prefer uppercase or case insensitive. |
Will you both test #355 by installing |
|
Having to pass
dotenv_config_path
as process argument yields some downside:Is it possible to pass dotenv_config_path as an env variable itself?
Instead of:
having:
The text was updated successfully, but these errors were encountered: