From d7d24c0499c6a6fb4eae4de82884ba8644c5cb81 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 15 Feb 2024 10:32:46 +0100 Subject: [PATCH] new: [rsync-backup-target] improve error messages !minor --- rsync-backup-target/hooks/init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rsync-backup-target/hooks/init b/rsync-backup-target/hooks/init index 3be9943..ae662eb 100755 --- a/rsync-backup-target/hooks/init +++ b/rsync-backup-target/hooks/init @@ -16,12 +16,13 @@ set -e service_def=$(get_compose_service_def "$SERVICE_NAME") admin_keys=$(echo "$service_def" | shyaml -y get-value options.admin 2>/dev/null) || { - err "You must specify a ${WHITE}admin${NORMAL} struct to use this service" + err "You must specify a ${WHITE}admin${NORMAL} struct in ${DARKYELLOW}$SERVICE_NAME${NORMAL}'s options" exit 1 } [ "$(echo "$admin_keys" | shyaml -y get-type 2>/dev/null)" == "struct" ] || { - err "Invalid value type for ${WHITE}admin${NORMAL}, please provide a struct" + err "Invalid value type for ${WHITE}admin${NORMAL} in" \ + "${DARKYELLOW}$SERVICE_NAME${NORMAL}'s options, please provide a struct" exit 1 }