Skip to content

Recursively load .envs up to root #14

Open
@daboross

Description

@daboross

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions