From 298c120b97c6565f2c053d11c12ccc2592dc40bd Mon Sep 17 00:00:00 2001 From: Evgeny Grin Date: Sun, 18 Feb 2024 11:36:27 +0500 Subject: [PATCH] checksrc.pl: fix handling .checksrc with CRLF - When parsing .checksrc chomp the (CR)LF line ending. Prior to this change on Windows checksrc.pl would not process the symbols in .checksrc properly, since many git repos in Windows use auto crlf to check out files with CRLF line endings. Closes https://github.com/curl/curl/pull/12924 --- scripts/checksrc.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checksrc.pl b/scripts/checksrc.pl index 76f4660816..be085e0613 100755 --- a/scripts/checksrc.pl +++ b/scripts/checksrc.pl @@ -120,6 +120,7 @@ sub readlocalfile { open(my $rcfile, "<", "$dir/.checksrc") or return; while(<$rcfile>) { + $windows_os ? $_ =~ s/\r?\n$// : chomp; $i++; # Lines starting with '#' are considered comments -- 2.47.3