Skip to content

Consider allowing directory to search for in find_dotenv #494

Open
@Samyak2

Description

@Samyak2

The issue

Currently, find_dotenv takes the cwd or the directory of the python file that called it. This does not allow specifying a custom directory to search for the .env file without temporarily switching the cwd before calling find_dotenv.

Proposed solution

Add a dir: Optional[StrPath] argument and use that instead of inferring if it's not None.

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