Skip to content

Commit

Permalink
handle encoding error when checking .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Nov 3, 2023
1 parent f3d3815 commit c4f6ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aider/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit c4f6ce6

Please sign in to comment.