From 402be49ac0060f3e8853b69a852308fc74c10ada Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Sat, 10 Jun 2017 17:19:46 -0400 Subject: [PATCH] Change array in loop bashism to satisfy shellcheck Warning: I'm not totally sure this is right, but it seems to be the recommended way to keep the same behavior we had but be explicit that we want it. If shellcheck was actually catching a bug and we don't want the old behavior, we should do the loop recommendation. https://github.com/koalaman/shellcheck/wiki/SC2199 Change-Id: Ibcb2e88ad4df7d1789747b137e2135154ca8435a Signed-off-by: Daniel Farrell --- jjb/opendaylight-infra-cleanup-stale-stacks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jjb/opendaylight-infra-cleanup-stale-stacks.sh b/jjb/opendaylight-infra-cleanup-stale-stacks.sh index 77edc93af0..76140a131d 100644 --- a/jjb/opendaylight-infra-cleanup-stale-stacks.sh +++ b/jjb/opendaylight-infra-cleanup-stale-stacks.sh @@ -36,7 +36,7 @@ done # delete them. for STACK_NAME in "${OS_STACKS[@]}"; do STACK_STATUS=$(openstack stack show -f json -c "stack_status" "$STACK_NAME" | jq -r '."stack_status"') - if [[ "${ACTIVE_BUILDS[@]}" =~ $STACK_NAME ]]; then + if [[ "${ACTIVE_BUILDS[*]}" =~ $STACK_NAME ]]; then # No need to delete stacks if there exists an active build for them continue else -- 2.36.6