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

@@ -145,7 +145,7 @@ docker run \
--env ARCH="${ARCH}" \
--rm \
-w ${script_dir} \
build-kata-deploy "${kata_deploy_create}" $@
build-kata-deploy "${kata_deploy_create}" "$@"
if [ $remove_dot_docker_dir == true ]; then
rm -rf "$HOME/.docker"

View File

@@ -193,7 +193,7 @@ cleanup_and_fail() {
if [ -n "${extra_tarballs}" ]; then
local mapping
IFS=' ' read -a mapping <<< "${extra_tarballs}"
for m in ${mapping[@]}; do
for m in "${mapping[@]}"; do
local extra_tarball_name=${m%:*}
rm -f "${extra_tarball_name}"
done
@@ -273,7 +273,7 @@ install_cached_tarball_component() {
local mapping
IFS=' ' read -a mapping <<< "${extra_tarballs}"
for m in ${mapping[@]}; do
for m in "${mapping[@]}"; do
local extra_tarball_name=${m%:*}
local extra_tarball_path=${m#*:}
@@ -1470,5 +1470,5 @@ main() {
}
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main $@
main "$@"
fi