Annotate CRLF

This commit is contained in:
Roxedus 2022-07-21 22:35:20 +02:00
parent 75218de62a
commit 39a4e158f8
No known key found for this signature in database
GPG key ID: EBC13557C4D91D7B

View file

@ -40,8 +40,9 @@ jobs:
CRLF_ENDINGS=$(find . -not -path '*/\.*' -type f -exec file "{}" ";" | grep CRLF || true)
CRLF_ENDINGS_COUNT=$(echo "${CRLF_ENDINGS}" | wc -w)
if (( CRLF_ENDINGS_COUNT > 0 )); then
echo "The following files have CRLF line endings (not allowed):"
echo "${CRLF_ENDINGS}"
for i in ${CRLF_ENDINGS}; do
echo "::error file=${i},line=1,title=Line Endings::This file has CRLF (Windows) line endings, which is not allowed"
done
exit 1
fi