@@ -152,7 +152,7 @@ def load_env_config(use_session_cookie: bool) -> Dict[str, Optional[str]]:
152
152
env_file = os .path .join (os .path .dirname (__file__ ), env_file_name )
153
153
if os .path .exists (env_file ):
154
154
logger .info (f"Found .env file: { env_file } " )
155
- load_dotenv (env_file )
155
+ load_dotenv (env_file , override = True )
156
156
file_found = True
157
157
file_path = env_file
158
158
logger .info (f"Loading environment variables from { env_file } " )
@@ -162,7 +162,7 @@ def load_env_config(use_session_cookie: bool) -> Dict[str, Optional[str]]:
162
162
env_file = os .path .join (os .path .dirname (__file__ ), '..' , env_file_name )
163
163
if os .path .exists (env_file ):
164
164
logger .info (f"Found .env file in parent directory: { env_file } " )
165
- load_dotenv (env_file )
165
+ load_dotenv (env_file , override = True )
166
166
file_found = True
167
167
file_path = env_file
168
168
logger .info (f"Loading environment variables from { env_file } " )
@@ -171,13 +171,13 @@ def load_env_config(use_session_cookie: bool) -> Dict[str, Optional[str]]:
171
171
env_file = os .path .join (os .getcwd (), env_file_name )
172
172
if os .path .exists (env_file ):
173
173
logger .info (f"Found .env file in current working directory: { env_file } " )
174
- load_dotenv (env_file )
174
+ load_dotenv (env_file , override = True )
175
175
file_found = True
176
176
file_path = env_file
177
177
logger .info (f"Loading environment variables from { env_file } " )
178
178
else :
179
179
# Fallback to default .env loading
180
- load_dotenv ()
180
+ load_dotenv (override = True )
181
181
logger .info ("Loading environment variables from default .env file" )
182
182
183
183
# Print banner showing which file is being used
0 commit comments