diff options
Diffstat (limited to 'docker-run.sh')
-rwxr-xr-x | docker-run.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docker-run.sh b/docker-run.sh index c626de11..b021b9bf 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -16,9 +16,10 @@ case "$qemu" in *) "$(dirname $0)"/start-container-qemu.sh "${CONVERTED_ARGS[@]:1}" > container.sh ;; esac -# Where prefix is something like "run_" or "test_" -# shellcheck disable=SC2064 -trap "${prefix}container_cleanup" EXIT +# Where prefix is something like "run_" or "test_". +# We ignore cleanup failures and exit with the original status code. +# shellcheck disable=SC2064 disable=SC2154 +trap "res=\$?; ${prefix}container_cleanup & wait \$! || true; exit \$res" EXIT . ./container.sh # We want to use flock only when WORKSPACE exists |