Skip to content

Commit bfe2d06

Browse files
Merge pull request #28 from ccdc-opensource/ignore-bat-files-in-non-autocrlf-environment
create exception for .bat files in check_eol
2 parents dcd736a + 8c7f30a commit bfe2d06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main/githooks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ def check_eol(files):
318318
if '\0' in data:
319319
continue
320320

321-
if data.find('\r\n') != -1:
321+
# Exception for .bat as they are only run in windows environments.
322+
if data.find('\r\n') != -1 and not filename.endswith(".bat"):
322323
_fail(f'Bad line endings in {filename}')
323324
return 1
324325
return 0

0 commit comments

Comments
 (0)