fix: Handle git errors in check_gitignore function

This commit is contained in:
Paul Gauthier (aider) 2025-02-04 07:59:26 -08:00
parent 4a963adbcb
commit d9adaa5020

View file

@ -181,6 +181,8 @@ def check_gitignore(git_root, io, ask=True):
return
else:
content = ""
except ANY_GIT_ERROR:
return
if ask:
io.tool_output("You can skip this check with --no-gitignore")
if not io.confirm_ask(f"Add {', '.join(patterns_to_add)} to .gitignore (recommended)?"):