mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 03:35:00 +00:00
fix: Handle FileNotFoundError in get_git_root function
This commit is contained in:
parent
7d766d53ee
commit
8349cd5c15
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ def get_git_root():
|
||||||
try:
|
try:
|
||||||
repo = git.Repo(search_parent_directories=True)
|
repo = git.Repo(search_parent_directories=True)
|
||||||
return repo.working_tree_dir
|
return repo.working_tree_dir
|
||||||
except git.InvalidGitRepositoryError:
|
except (git.InvalidGitRepositoryError, FileNotFoundError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue