Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit 9778fbe

Browse files
authored
Merge pull request #8 from cms-DQM/env_path_fix
2 parents f1527c9 + 50dd647 commit 9778fbe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

runregistry/runregistry.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
__parse_runs_arg,
1111
)
1212

13-
load_dotenv()
13+
# Look for .env file in the directory of the caller
14+
# first. If it exists, use it.
15+
if os.path.exists(os.path.join(os.getcwd(), ".env")):
16+
load_dotenv(dotenv_path=os.path.join(os.getcwd(), ".env"))
17+
else:
18+
load_dotenv()
1419

1520

1621
# Silence unverified HTTPS warning:

0 commit comments

Comments
 (0)