workaround issue with file command
This commit is contained in:
@@ -206,7 +206,7 @@ fi
|
||||
|
||||
#check no file contains non-utf8 characters
|
||||
echo '.. Checking if non utf-8 characters are used...'
|
||||
txt_not_utf8=$(git ls-files -z --stage | awk -F"\t" 'BEGIN { RS="\0" }; { printf "%s\n", $2; }' | xargs file -N | grep "text" | grep -E -v "UTF-8|ASCII|CSV|XML|EPS|FIG|JSON|pixmap|assembler source|Perl script|from flex")
|
||||
txt_not_utf8=$(git ls-files -z --stage | awk -F"\t" 'BEGIN { RS="\0" }; { printf "%s\n", $2; }' | xargs file -N | grep "text" | grep -E -v "UTF-8|ASCII|CSV|XML|EPS|FIG|JSON|pixmap|magic|assembler source|Perl script|from flex")
|
||||
if [ -n "${txt_not_utf8}" ]; then
|
||||
echo "The following files have non utf-8 characters:"
|
||||
echo ${txt_not_utf8}
|
||||
|
||||
Reference in New Issue
Block a user