mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
fix: Handle OSError when loading dotenv files
This commit is contained in:
parent
924eeb43de
commit
25c3a959dd
1 changed files with 2 additions and 0 deletions
|
@ -278,6 +278,8 @@ def load_dotenv_files(git_root, dotenv_fname, encoding="utf-8"):
|
||||||
try:
|
try:
|
||||||
load_dotenv(fname, override=True, encoding=encoding)
|
load_dotenv(fname, override=True, encoding=encoding)
|
||||||
loaded.append(fname)
|
loaded.append(fname)
|
||||||
|
except OSError as e:
|
||||||
|
print(f"OSError loading {fname}: {e}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error loading {fname}: {e}")
|
print(f"Error loading {fname}: {e}")
|
||||||
return loaded
|
return loaded
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue