mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +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
|
repo = None
|
||||||
|
|
||||||
if git_root:
|
if git_root:
|
||||||
|
try:
|
||||||
repo = git.Repo(git_root)
|
repo = git.Repo(git_root)
|
||||||
|
except ANY_GIT_ERROR:
|
||||||
|
pass
|
||||||
elif cwd == Path.home():
|
elif cwd == Path.home():
|
||||||
io.tool_warning("You should probably run aider in a directory, not your home dir.")
|
io.tool_warning("You should probably run aider in a directory, not your home dir.")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue