diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh index 9536b1ddf3..42feaa4984 100644 --- a/scripts/ci/libraries/_build_images.sh +++ b/scripts/ci/libraries/_build_images.sh @@ -509,7 +509,7 @@ function build_images::build_ci_image() { spinner::spin "${OUTPUT_LOG}" & SPIN_PID=$! # shellcheck disable=SC2064 - traps::add_trap "kill ${SPIN_PID}" INT TERM HUP EXIT + traps::add_trap "kill ${SPIN_PID} || true" INT TERM HUP EXIT fi push_pull_remove_images::pull_ci_images_if_needed if [[ "${DOCKER_CACHE}" == "disabled" ]]; then @@ -537,7 +537,7 @@ function build_images::build_ci_image() { spinner::spin "${OUTPUT_LOG}" & SPIN_PID=$! # shellcheck disable=SC2064 - traps::add_trap "kill ${SPIN_PID}" EXIT HUP INT TERM + traps::add_trap "kill ${SPIN_PID} || true" EXIT HUP INT TERM fi if [[ -n ${DETECTED_TERMINAL=} ]]; then echo -n " diff --git a/scripts/in_container/_in_container_utils.sh b/scripts/in_container/_in_container_utils.sh index 9e8f19664a..3e94a9e821 100644 --- a/scripts/in_container/_in_container_utils.sh +++ b/scripts/in_container/_in_container_utils.sh @@ -235,7 +235,7 @@ EOF } function stop_output_heartbeat() { - kill "${HEARTBEAT_PID}" + kill "${HEARTBEAT_PID}" || true wait "${HEARTBEAT_PID}" || true 2> /dev/null }