Skip to content

Commit 3df6a80

Browse files
authored
Merge pull request #21 from grok-ai/bug/dotenv
Fix .env resolution from cwd
2 parents afb0fa8 + 9178520 commit 3df6a80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/nn_core/common/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def load_envs(env_file: Optional[str] = None) -> None:
5151
:param env_file: the file that defines the environment variables to use. If None
5252
it searches for a `.env` file in the project.
5353
"""
54+
if env_file is None:
55+
env_file = dotenv.find_dotenv(usecwd=True)
5456
dotenv.load_dotenv(dotenv_path=env_file, override=True)
5557

5658

0 commit comments

Comments
 (0)