From 852a80fcbd21fa12d6b53fc6ab79029cc0f9b90a Mon Sep 17 00:00:00 2001 From: Nikola Jokic <97525037+nikola-jokic@users.noreply.github.com> Date: Mon, 28 Nov 2022 17:33:01 +0100 Subject: [PATCH] Return exit code when MANUALLY_TRAP_SIG is exported (#2285) --- images/Dockerfile | 1 + src/Misc/layoutroot/run.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/images/Dockerfile b/images/Dockerfile index b87755b0d..11820673d 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -18,6 +18,7 @@ RUN curl -f -L -o runner-container-hooks.zip https://github.com/actions/runner-c FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 ENV RUNNER_ALLOW_RUNASROOT=1 +ENV RUNNER_MANUALLY_TRAP_SIG=1 WORKDIR /actions-runner COPY --from=build /actions-runner . diff --git a/src/Misc/layoutroot/run.sh b/src/Misc/layoutroot/run.sh index 89902eb2e..a558793d0 100755 --- a/src/Misc/layoutroot/run.sh +++ b/src/Misc/layoutroot/run.sh @@ -48,7 +48,7 @@ runWithManualTrap() { trap - INT TERM # wait for last parts to be logged wait $PID - exit 0 + exit $returnCode fi done }