From f41dd1b7236c21a57f844e3571645fc82a981ed7 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 3 Dec 2025 12:45:56 +0900 Subject: [PATCH] Change verify command error check --- borg.backup.functions.verify.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/borg.backup.functions.verify.sh b/borg.backup.functions.verify.sh index 8f3a98a..6bcd6dc 100644 --- a/borg.backup.functions.verify.sh +++ b/borg.backup.functions.verify.sh @@ -300,7 +300,8 @@ if [ "${VERIFY}" -eq 1 ] || [ "${INIT}" -eq 1 ]; then fi; # use borg info and verify if it returns "Repository ID:" in the first line REPO_VERIFY=$(${BORG_COMMAND} info ${OPT_REMOTE} "${REPOSITORY}" 2>&1); - if [ ! $? ]; then + __LAST_ERROR=$? + if [ $__LAST_ERROR -ne 0 ]; then echo "[!] Repository verify error: ${REPO_VERIFY}"; REPO_VERIFY=""; else