mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-29 01:31:41 +00:00
fix(cli): ensure project .env is sanitized before loading
This commit is contained in:
parent
cf55c738e7
commit
83cb9a03ee
2 changed files with 21 additions and 0 deletions
|
|
@ -160,6 +160,8 @@ def load_hermes_dotenv(
|
|||
# Fix corrupted .env files before python-dotenv parses them (#8908).
|
||||
if user_env.exists():
|
||||
_sanitize_env_file_if_needed(user_env)
|
||||
if project_env_path and project_env_path.exists():
|
||||
_sanitize_env_file_if_needed(project_env_path)
|
||||
|
||||
if user_env.exists():
|
||||
_load_dotenv_with_fallback(user_env, override=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue