From a9fe6b810e6f630b18c9eba3cc3b5abe12605221 Mon Sep 17 00:00:00 2001 From: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com> Date: Mon, 28 Mar 2022 09:33:33 +0200 Subject: [PATCH] Fixes displaying the wrong variable on error in file_env --- docker-volumes/smtpd/docker-entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-volumes/smtpd/docker-entrypoint.sh b/docker-volumes/smtpd/docker-entrypoint.sh index 50e1db7..126dcf3 100755 --- a/docker-volumes/smtpd/docker-entrypoint.sh +++ b/docker-volumes/smtpd/docker-entrypoint.sh @@ -9,10 +9,9 @@ shopt -s nullglob file_env() { local var="$1" local fileVar="${var}_FILE" - local varName="${!var@}" local def="${2:-}" if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then - echo >&2 "error: both ${varName} and ${fileVar} are set (but are mutually exclusive)" + echo >&2 "error: both ${var} and ${fileVar} are set (but are mutually exclusive)" exit 1 fi local val="$def"