From 88fb7f8339c562836e9ec140268efa3a047161ed Mon Sep 17 00:00:00 2001 From: rmcdermo Date: Tue, 8 Aug 2023 16:21:45 -0400 Subject: [PATCH] Workflow: this might work --- .github/workflows/Line_Endings.yml | 15 ++++++++------- test.txt | 6 ------ 2 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 test.txt diff --git a/.github/workflows/Line_Endings.yml b/.github/workflows/Line_Endings.yml index 8402afe..f83ecfc 100644 --- a/.github/workflows/Line_Endings.yml +++ b/.github/workflows/Line_Endings.yml @@ -25,13 +25,14 @@ jobs: - name: Check for CRLF line endings run: | - grep -IUlr --exclude={"*.pdf","*.png"} --exclude-dir=".git" $'\r' -# nlines=$(cat tmp.txt | wc -l) -# if [ $nlines -gt 0 ]; then -# echo "matl-db repo text files with dos line endings:" -# cat tmp.txt -# exit 1 -# fi + grep -IUlr --exclude={"*.pdf","*.png"} --exclude-dir=".git" $'\r' > tmp.txt + exit 0 + nlines=$(cat tmp.txt | wc -l) + if [ $nlines -gt 0 ]; then + echo "matl-db repo text files with dos line endings:" + cat tmp.txt + exit 1 + fi diff --git a/test.txt b/test.txt deleted file mode 100644 index a005d89..0000000 --- a/test.txt +++ /dev/null @@ -1,6 +0,0 @@ -This -is -a -test of line -endings -