From a1a2d7101b1b4d255bd9c60e7fead4b6b7e3feb2 Mon Sep 17 00:00:00 2001 From: Arthri <41360489+a@users.noreply.github.com> Date: Sun, 30 Jul 2023 08:18:45 +0000 Subject: [PATCH 1/2] Allow "none" end-of-line sequence --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 732dfcb..7746c20 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ runs: while IFS= read line; do if [[ $line =~ ^i/([^ ]*)\ +w/[^\ ]*\ +attr/[^$'\t']+$'\t'(.+)$ ]] ; then index_eol=${BASH_REMATCH[1]} - if [ "$index_eol" != $DEFAULT_EOL ] ; then + if [ "$index_eol" != $DEFAULT_EOL ] && [ "$index_eol" != 'none' ] ; then echo "${BASH_REMATCH[2]}:"$'\t'"End-of-line sequence in index($index_eol) must be LF." exit_code=1 fi From ed0a7edbb993548ae248c4897bb819db5c3abb3f Mon Sep 17 00:00:00 2001 From: Arthri <41360489+a@users.noreply.github.com> Date: Sun, 30 Jul 2023 08:22:43 +0000 Subject: [PATCH 2/2] Also ignore non-text files and inaccessible files --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7746c20..355579f 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ runs: while IFS= read line; do if [[ $line =~ ^i/([^ ]*)\ +w/[^\ ]*\ +attr/[^$'\t']+$'\t'(.+)$ ]] ; then index_eol=${BASH_REMATCH[1]} - if [ "$index_eol" != $DEFAULT_EOL ] && [ "$index_eol" != 'none' ] ; then + if [ "$index_eol" != $DEFAULT_EOL ] && [ "$index_eol" != 'none' ] && [ "$index_eol" != '-text' ] && [ "$index_eol" != '' ] ; then echo "${BASH_REMATCH[2]}:"$'\t'"End-of-line sequence in index($index_eol) must be LF." exit_code=1 fi