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 = ""