mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: Handle git repo initialization errors gracefully
This commit is contained in:
parent
94a6d3bc7e
commit
acfb7c3a89
1 changed files with 4 additions and 1 deletions
|
@ -95,7 +95,10 @@ def setup_git(git_root, io):
|
|||
repo = None
|
||||
|
||||
if git_root:
|
||||
repo = git.Repo(git_root)
|
||||
try:
|
||||
repo = git.Repo(git_root)
|
||||
except ANY_GIT_ERROR:
|
||||
pass
|
||||
elif cwd == Path.home():
|
||||
io.tool_warning("You should probably run aider in a directory, not your home dir.")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue