Browse Source

all.sh exit 1 when error

main
pvincent 2 weeks ago
parent
commit
6e68542aae
  1. 16
      all.sh

16
all.sh

@ -17,14 +17,14 @@ if [[ -f .errors ]]; then
count=$(cat .errors | wc -l) count=$(cat .errors | wc -l)
if [[ $count -gt 0 ]]; then if [[ $count -gt 0 ]]; then
echo -e "--------------------"
echo -e " \e[0;31m$count\e[0m errors detected!"
echo -e "--------------------"
cat .errors
echo -e "--------------------"
echo -e " \e[0;31m$count\e[0m errors detected!"
echo -e "--------------------"
cat .errors
exit 1
else else
echo -e "\e[0;32m------------------------\e[0m"
echo -e "everything 's \e[0;32mall right!\e[0m"
echo -e "\e[0;32m------------------------\e[0m"
echo -e "\e[0;32m------------------------\e[0m"
echo -e "everything 's \e[0;32mall right!\e[0m"
echo -e "\e[0;32m------------------------\e[0m"
fi fi
fi fi
Loading…
Cancel
Save