diff --git a/aider/main.py b/aider/main.py index b0ebf5075..cc4d30ab5 100644 --- a/aider/main.py +++ b/aider/main.py @@ -86,7 +86,7 @@ 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 pat in content.splitlines(): + if content and pat in content.splitlines(): return else: content = ""