Fix EXIT trap function call

The function call is valid, but the script uses `set -u`, so
function calls without "optional" arguments trigger errors.
This commit is contained in:
Eric Platon 2025-08-06 10:50:02 +09:00
parent 20e5c74316
commit 5b63d8190c
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ cleanup () {
rmdir --ignore-fail-on-non-empty $TEMP_ROOT_DIR || true
fi
}
trap 'status=$?; cleanup; exit $status' EXIT
trap 'status=$?; cleanup ""; exit $status' EXIT
trap 'trap - HUP; cleanup SIGHUP; kill -HUP $$' HUP
trap 'trap - INT; cleanup SIGINT; kill -INT $$' INT
trap 'trap - TERM; cleanup SIGTERM; kill -TERM $$' TERM