mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
handle the case of no git repo
This commit is contained in:
parent
1d0d91d71e
commit
82d7f04865
1 changed files with 6 additions and 3 deletions
|
@ -74,9 +74,12 @@ def check_gitignore(git_root, io, ask=True):
|
|||
if not git_root:
|
||||
return
|
||||
|
||||
repo = git.Repo(git_root)
|
||||
if repo.ignored(".aider"):
|
||||
return
|
||||
try:
|
||||
repo = git.Repo(git_root)
|
||||
if repo.ignored(".aider"):
|
||||
return
|
||||
except git.exc.InvalidGitRepositoryError:
|
||||
pass
|
||||
|
||||
pat = ".aider*"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue