Skip to content

Commit

Permalink
fix: Handle OSError in get_rel_repo_dir method for edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Nov 13, 2024
1 parent 733b11b commit 153021e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aider/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def commit(self, fnames=None, context=None, message=None, aider_edits=False):
def get_rel_repo_dir(self):
try:
return os.path.relpath(self.repo.git_dir, os.getcwd())
except ValueError:
except (ValueError, OSError):
return self.repo.git_dir

def get_commit_message(self, diffs, context):
Expand Down

0 comments on commit 153021e

Please sign in to comment.