From 810fa920383cbed17699adfea409553b8e1ca6ed Mon Sep 17 00:00:00 2001 From: ttionya Date: Thu, 16 Jan 2025 11:32:44 +0800 Subject: [PATCH] feat: add warning prompt information --- scripts/includes.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/includes.sh b/scripts/includes.sh index 038290c..3e24a80 100644 --- a/scripts/includes.sh +++ b/scripts/includes.sh @@ -56,9 +56,13 @@ function check_rclone_connection() { if [[ "$1" == "all" ]]; then color red "storage system connection failure exists" exit 1 - elif [[ "$1" == "any" && "${ERROR_COUNT}" -eq "${#RCLONE_REMOTE_LIST[@]}" ]]; then - color red "all storage system connections failed" - exit 1 + elif [[ "$1" == "any" ]]; then + if [[ "${ERROR_COUNT}" -eq "${#RCLONE_REMOTE_LIST[@]}" ]]; then + color red "all storage system connections failed" + exit 1 + else + color yellow "some storage system connections failed, but the backup will continue" + fi fi fi }