Merge pull request #576 from evandroforks/fix_ripgrep_not_failing

trailing-newlines.sh should exit with error code 1
This commit is contained in:
Damien Elmes 2020-04-23 20:02:50 +10:00 committed by GitHub
commit 9dcbb8958d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,11 @@ set -eu -o pipefail ${SHELLFLAGS}
# Checking version to force it fail the build if rg is not installed.
# Because `set -e` does not work inside the subshell $()
rg --version > /dev/null 2>&1 || echo "Error: ripgrep is not installed!"
if ! rg --version > /dev/null 2>&1;
then
echo "Error: ripgrep is not installed!";
exit 1;
fi;
files=$(rg -l '[^\n]\z' -g '!*.{png,svg,scss,json,sql}' || true)