Actions: Properly fail now

This commit is contained in:
Miepee 2022-02-04 15:09:27 +01:00 committed by Riesi
parent a688e7c2a6
commit 7d162f40f0
1 changed files with 4 additions and 4 deletions

View File

@ -23,13 +23,14 @@ jobs:
- name: Install Inkscape - name: Install Inkscape
run: sudo apt install inkscape run: sudo apt install inkscape
- name: Check Viewbox parameters - name: Check SVG validity
run: | run: |
# Enables globstar to recursively go through folders # Enables globstar to recursively go through folders
shopt -s globstar shopt -s globstar
errArr=() errArr=()
for f in ./**/*.svg for f in ./**/*.svg
do do
echo "Checking '$f'"
# Gets everything in between the viewBox quotes # Gets everything in between the viewBox quotes
vbStr=$(cat $f) vbStr=$(cat $f)
vbStr=${vbStr##*viewBox=\"} vbStr=${vbStr##*viewBox=\"}
@ -57,9 +58,8 @@ jobs:
errArr+=("$f is only one line!") errArr+=("$f is only one line!")
fi fi
done done
if [[ ${#errArr[@]} != 0 ]] ; then echo "this should get hit" ; fi
- name: Post results # Results
run: |
if [[ ${#errArr[@]} != 0 ]] ; then if [[ ${#errArr[@]} != 0 ]] ; then
for errMess in "${errArr[@]}" for errMess in "${errArr[@]}"
do do