From 6e68542aae4a072ed23bb2da5538ba6430703c5c Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 8 Jun 2025 08:46:39 +0400 Subject: [PATCH] all.sh exit 1 when error --- all.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/all.sh b/all.sh index 2751f32..1e449c6 100755 --- a/all.sh +++ b/all.sh @@ -17,14 +17,14 @@ if [[ -f .errors ]]; then count=$(cat .errors | wc -l) 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 - 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