Skip to content
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

Environment variable file .env should support export? #83

Open
tashian opened this issue Jun 1, 2021 · 1 comment
Open

Environment variable file .env should support export? #83

tashian opened this issue Jun 1, 2021 · 1 comment

Comments

@tashian
Copy link
Member

tashian commented Jun 1, 2021

Some folks prefer having an .env file that prepends env variables with export, so that it can also be sourced from Bash scripts, eg:

export FLASK_ENV=development
export NODE_ENV=development

Is this a pattern we should encourage?

@Rubix982
Copy link
Contributor

Rubix982 commented Aug 3, 2021

I think it would depend on the context. If you're usually working with bash, and are sure you're not going to use other languages or software that might want to read that .env - sure, it doesn't harm your work.

On the contrary, this pattern makes it specific to bash only and now you would need to split each line with ' ' and then only select the 2nd part of that. By default, I don't know if dotenv libraries support such a behavior.

Again, that depends on the context if you're willing to take that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants