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
This commit is contained in:
Evgeny Grin 2024-02-18 11:36:27 +05:00 committed by Jay Satiro
parent b2497a8d15
commit 298c120b97

View file

@ -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