Abandon checking gitignore if can not read file

This commit is contained in:
Paul Gauthier 2023-11-03 08:33:32 -07:00
parent c4f6ce6435
commit d868e96467

View file

@ -86,7 +86,9 @@ def check_gitignore(git_root, io, ask=True):
gitignore_file = Path(git_root) / ".gitignore" gitignore_file = Path(git_root) / ".gitignore"
if gitignore_file.exists(): if gitignore_file.exists():
content = io.read_text(gitignore_file) content = io.read_text(gitignore_file)
if content and pat in content.splitlines(): if content is None:
return
if pat in content.splitlines():
return return
else: else:
content = "" content = ""