From 4a2bfd71701e792c77a37732099ab5a30a71a0d0 Mon Sep 17 00:00:00 2001 From: Aahnik Daw Date: Sun, 30 Oct 2022 10:34:03 +0530 Subject: [PATCH] load .env from pwd --- tgcf/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tgcf/config.py b/tgcf/config.py index 792310d4..ab51575a 100644 --- a/tgcf/config.py +++ b/tgcf/config.py @@ -13,7 +13,10 @@ from tgcf.const import CONFIG_ENV_VAR_NAME, CONFIG_FILE_NAME from tgcf.plugin_models import PluginConfig -load_dotenv() +pwd = os.getcwd() +env_file = os.path.join(pwd, ".env") + +load_dotenv(env_file) class Forward(BaseModel):