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

Recursively load .envs up to root #14

Open
daboross opened this issue May 30, 2019 · 1 comment · May be fixed by #36
Open

Recursively load .envs up to root #14

daboross opened this issue May 30, 2019 · 1 comment · May be fixed by #36
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@daboross
Copy link
Contributor

One thing this crate was missing before, and is still missing, is the ability to load multiple cascading .env files.

For example, if I have the following in project/.env:

X=1
Y=2

And the following in project/subdir/.env:

Y=5

It would be ideal if running dotenv::dotenv() in project/subdir/ would load

X=1
Y=5

I think one of the hardest parts of this is the API design, though, especially with specifying manual filenames (or directory names for cascading).

If you'd be willing to support this, I would recommend iterating on solutions before committing to 1.0.

@ZoeyR
Copy link
Contributor

ZoeyR commented May 30, 2019

Recursively loading files up to the root is definitely something I will look into. With manual file specification my instinct is that if a custom filename is provided then that will be the filename that is searched for recursively up through the directories since that is the behavior today with single-file merge.

@ZoeyR ZoeyR added enhancement New feature or request good first issue Good for newcomers labels May 30, 2019
@ZoeyR ZoeyR linked a pull request Feb 4, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants