diff --git a/gitlab/functions.sh b/gitlab/functions.sh index b6fe2ec9d3d01745394c7408b548928d637c8c48..bf52fd72443793ceac567d7ecd51b309c6e6c1d3 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -27,7 +27,7 @@ log_error() { # Checks a given environment variable is set (non-zero size) check_env() { - if [ -z "${!1}" ]; then + if [ -z "${1+abc}" ]; then log_error "Variable ${1} is undefined - aborting..."; exit 1 else @@ -38,7 +38,7 @@ check_env() { # Exports a given environment variable, verbosely export_env() { - if [ -z "${!1}" ]; then + if [ -z "${1+abc}" ]; then log_error "Variable ${1} is undefined - aborting..."; exit 1 else @@ -50,7 +50,7 @@ export_env() { # Checks a given environment variable is set (non-zero size) check_pass() { - if [ -z "${!1}" ]; then + if [ -z "${1+abc}" ]; then log_error "Variable ${1} is undefined - aborting..."; exit 1 else