Skip to content

Commit 8c7f30a

Browse files
create exception for .bat when check_eol commit hooks are run in a non windows environment NO_JIRA
1 parent dcd736a commit 8c7f30a

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)