From ac3a17291e0076778a595c10e38d856b52c5a36e Mon Sep 17 00:00:00 2001 From: Jeremiah Sanders <1328897+JeremiahSanders@users.noreply.github.com> Date: Mon, 17 Oct 2022 18:02:52 -0500 Subject: [PATCH] fix(macos): verify ci environment secrets are set during display --- src/lib/ci/bash/actions/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ci/bash/actions/env.sh b/src/lib/ci/bash/actions/env.sh index 2213570..8315296 100755 --- a/src/lib/ci/bash/actions/env.sh +++ b/src/lib/ci/bash/actions/env.sh @@ -324,7 +324,7 @@ function ci-env-display() { # Loop through the CI environment variables. for variableName in "${CIENV_VARIABLES[@]}"; do # If the variable is defined as "secret"... - if [[ "${CIENV_VARIABLES_SECRET[*]}" =~ ${variableName} ]]; then + if [[ -n "${CIENV_VARIABLES_SECRET:-}" && "${CIENV_VARIABLES_SECRET[*]}" =~ ${variableName} ]]; then # ... and if the variable has a value... if [[ -n "${!variableName:-}" ]]; then # ...record the value masked.