mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Fix for when running in strict mode
This commit is contained in:
4
mo
4
mo
@@ -835,13 +835,13 @@ moShow() {
|
|||||||
|
|
||||||
moSplit moNameParts "$1" "."
|
moSplit moNameParts "$1" "."
|
||||||
|
|
||||||
if [[ -z "${moNameParts[1]}" ]]; then
|
if [[ -z "${moNameParts[1]-}" ]]; then
|
||||||
if moIsArray "$1"; then
|
if moIsArray "$1"; then
|
||||||
eval moJoin moJoined "," "\${$1[@]}"
|
eval moJoin moJoined "," "\${$1[@]}"
|
||||||
echo -n "$moJoined"
|
echo -n "$moJoined"
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2031
|
# shellcheck disable=SC2031
|
||||||
if [[ -z "$MO_FAIL_ON_UNSET" ]] || moTestVarSet "$1"; then
|
if [[ -z "${MO_FAIL_ON_UNSET-}" ]] || moTestVarSet "$1"; then
|
||||||
echo -n "${!1}"
|
echo -n "${!1}"
|
||||||
else
|
else
|
||||||
echo "Env variable not set: $1" >&2
|
echo "Env variable not set: $1" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user