diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh index 2a8391dbd1..a42476de7d 100644 --- a/scripts/ci/libraries/_build_images.sh +++ b/scripts/ci/libraries/_build_images.sh @@ -519,8 +519,8 @@ function build_images::build_ci_image() { " >"${DETECTED_TERMINAL}" spinner::spin "${OUTPUT_LOG}" & SPIN_PID=$! - # shellcheck disable=SC2064 - traps::add_trap "kill ${SPIN_PID} || true" INT TERM HUP EXIT + # shellcheck disable=SC2064,SC2016 + traps::add_trap '$(kill '${SPIN_PID}' || true)' EXIT HUP INT TERM fi push_pull_remove_images::pull_ci_images_if_needed if [[ "${DOCKER_CACHE}" == "disabled" ]]; then @@ -557,8 +557,8 @@ function build_images::build_ci_image() { " >"${DETECTED_TERMINAL}" spinner::spin "${OUTPUT_LOG}" & SPIN_PID=$! - # shellcheck disable=SC2064 - traps::add_trap "kill ${SPIN_PID} || true" EXIT HUP INT TERM + # shellcheck disable=SC2064,SC2016 + traps::add_trap '$(kill '${SPIN_PID}' || true)' EXIT HUP INT TERM fi if [[ -n ${DETECTED_TERMINAL=} ]]; then echo -n "