From d868e964676cf1e2238d559c67c7fe0d578098fc Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 3 Nov 2023 08:33:32 -0700 Subject: [PATCH] Abandon checking gitignore if can not read file --- aider/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index cc4d30ab5..e1462f195 100644 --- a/aider/main.py +++ b/aider/main.py @@ -86,7 +86,9 @@ def check_gitignore(git_root, io, ask=True): gitignore_file = Path(git_root) / ".gitignore" if gitignore_file.exists(): content = io.read_text(gitignore_file) - if content and pat in content.splitlines(): + if content is None: + return + if pat in content.splitlines(): return else: content = ""