Annotate CRLF

This commit is contained in:
Roxedus
2022-07-21 22:35:20 +02:00
parent 75218de62a
commit 39a4e158f8
+3 -2
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