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
Allow for optional export
at the beginning of each line
#213
Comments
Discussion in #112 and #118 are still valid to me. Check out dotenv-export |
@DesignByOnyx If this is still bugging you, I recently wrote nvar. It works mostly like dotenv, except its syntax follows Shell instead of INI, so things like |
Thanks for the nvar recommendation. |
I'm a little confused. Isn't the point of this dotenv to follow the dotenv spec as set forth by the original dotenv? Also, (RE: #118): # valid
EXPORT=true
# valid
export EXPORT=true
# invalid: `export` is exclusively lowercase
EXPORT EXPORT=true
# ... of questionable validity: ENVs are supposed to be ALL_CAPS.
foo=bar Although |
dotenv-export isn't helpful in the minimal case. Scenario: We're using create-react-app, and therefore dotenv implicitly. We have .env files. In our circle and build environments, we need the same env vars exported for things outside of node. In other words, we just want to be able to dotenv-export doesn't make this possible because it requires that we use it as the CLI. Which means we now need to install node and dotenv-export into containers that otherwise don't need node at all. The frustration that we (and clearly many others #112 (comment)) are experiencing is that dotenv doesn't support the "conventional" .env file format that would make it interoperable with a host of other tooling ( |
Sometimes it is useful to export the contents of the
.env
file into the current terminal session so that individual scripts can be tested in isolation. The only way it is possible right now is to use a rather convoluted script to read the contents and export them:It would be nice to allow for an optional
export
word at the beginning of each line:This would allow users to
source
their environment vars into the current bash/terminal session:The text was updated successfully, but these errors were encountered: