From 8c7f30ac284285fc1e448068d0e05d9f7e8a5496 Mon Sep 17 00:00:00 2001 From: nicholas gonzalez Date: Fri, 11 Jul 2025 13:32:05 +0100 Subject: [PATCH] create exception for .bat when check_eol commit hooks are run in a non windows environment NO_JIRA --- main/githooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/githooks.py b/main/githooks.py index 7be88b3..b3e35dc 100755 --- a/main/githooks.py +++ b/main/githooks.py @@ -318,7 +318,8 @@ def check_eol(files): if '\0' in data: continue - if data.find('\r\n') != -1: + # Exception for .bat as they are only run in windows environments. + if data.find('\r\n') != -1 and not filename.endswith(".bat"): _fail(f'Bad line endings in {filename}') return 1 return 0