Skip to content

Command does not load dotenv files if some do not exist #175

@evandam

Description

@evandam

Hi @joho, I noticed some unexpected behavior when using godotenv from the command line. When passing multiple .env files, if one listed first does not exist, it looks like it skips processing the rest.

For example:

$ cat .env
FOO="Using .env"

$ godotenv -f ".env,.env.doesnotexist" env | grep FOO
FOO=Using .env

$ godotenv -f ".env.doesnotexist,.env" env | grep FOO
# FOO does not get set

Any thoughts on a solution for this?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions