shellcheck: Fix shellcheck SC2068

> Double quote array expansions to avoid re-splitting elements

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2025-02-28 11:25:14 +00:00
parent 58672068ff
commit c5ff513e0b
23 changed files with 40 additions and 40 deletions

View File

@@ -52,7 +52,7 @@ main()
done
[ "$flag" == "false" ] && result+=("$TEST_ENTRY")
done
echo ${result[@]}
echo "${result[@]}"
}
main "$@"

View File

@@ -132,7 +132,7 @@ ensure_yq
info "Running tests with bats version: $(bats --version)"
tests_fail=()
for K8S_TEST_ENTRY in ${K8S_TEST_UNION[@]}
for K8S_TEST_ENTRY in "${K8S_TEST_UNION[@]}"
do
info "$(kubectl get pods --all-namespaces 2>&1)"
info "Executing ${K8S_TEST_ENTRY}"

View File

@@ -238,7 +238,7 @@ add_requests_to_policy_settings() {
auto_generate_policy_enabled || return 0
for request in ${requests[@]}
for request in "${requests[@]}"
do
info "${settings_dir}/genpolicy-settings.json: allowing ${request}"
jq ".request_defaults.${request} |= true" \