mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
trailing-newlines.sh should exit with error code 1 otherwise
the script will not fail/stop.
This commit is contained in:
parent
1661cad801
commit
a5061b5a34
1 changed files with 5 additions and 1 deletions
6
.github/scripts/trailing-newlines.sh
vendored
6
.github/scripts/trailing-newlines.sh
vendored
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue