fix: Handle OSError when resolving config file path

This commit is contained in:
Paul Gauthier 2024-10-01 14:19:09 -07:00 committed by Paul Gauthier (aider)
parent 12578c0388
commit 1a4ef0f532
2 changed files with 8 additions and 1 deletions

View file

@ -347,7 +347,12 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
conf_fname = Path(".aider.conf.yml")
default_config_files = [conf_fname.resolve()] # CWD
default_config_files = []
try:
default_config_files += [conf_fname.resolve()] # CWD
except OSError:
pass
if git_root:
git_conf = Path(git_root) / conf_fname # git root
if git_conf not in default_config_files:

View file

@ -22,6 +22,8 @@ Reply only with the one-line commit message, without any additional text, explan
or line breaks.
"""
print(commit_system)
# COMMANDS
undo_command_reply = (
"I did `git reset --hard HEAD~1` to discard the last edits. Please wait for further"