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

source another file? #33

Open
clouds56 opened this issue Dec 12, 2019 · 1 comment
Open

source another file? #33

clouds56 opened this issue Dec 12, 2019 · 1 comment

Comments

@clouds56
Copy link

I have 2 env files, .env which added to version control and .env.secret which saves password, is it possible to "source" .env.secret file in .env?

for example

# in .env
URL=https://example.com
source .env.secret

# in .env.secret
USERNAME=example
PASSWORD=password

I know dotenv::from_path(".env.secret").ok() could do this but it would be good to have this feature to make third party cli like "diesel_cli" happy.

@Plecra
Copy link
Contributor

Plecra commented Jun 25, 2020

  • Ruby supports it,
  • JS decries it,
  • PHP glosses over it,
  • Haskell is flexible about it,

but most importantly, there's no standard for it. I find myself agreeing with JS' stance on the problem, where the environment is considered separate on every machine. Is the env.example model so bad? (I remember using it myself, it makes the task of filling in your "secret" values intuitive)

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