From 4f615a0fafb50629c349ebcb67c6a15d1aa69148 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Mon, 13 Nov 2017 10:43:32 -0600 Subject: [PATCH] More fixes if variables are not set and strict mode is enabled --- mo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mo b/mo index 8bc1177..cadb032 100755 --- a/mo +++ b/mo @@ -841,9 +841,9 @@ moShow() { echo -n "$moJoined" else # shellcheck disable=SC2031 - if [[ -z "${MO_FAIL_ON_UNSET-}" ]] || moTestVarSet "$1"; then + if moTestVarSet "$1"; then echo -n "${!1}" - else + elif [[ -n "${MO_FAIL_ON_UNSET-}" ]]; then echo "Env variable not set: $1" >&2 exit 1 fi