Skip to content

Commit

Permalink
Merge pull request #159 from JeremiahSanders/bugfix/fix-unbound-secre…
Browse files Browse the repository at this point in the history
…ts-variable

fix(macos): verify ci environment secrets are set during display
  • Loading branch information
JeremiahSanders authored Oct 17, 2022
2 parents fa29179 + ac3a172 commit a0469d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/ci/bash/actions/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a0469d4

Please sign in to comment.