From e80960878a44d07636c50646e18a52b66b36c9e6 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 19 Mar 2026 17:36:44 +0100 Subject: [PATCH] umpf: propagate the last exit code before calling cleanup() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cleanup is called at the end of many operations and it doesn't not take care of saving the last exit code. This results in an umpf push failing at the final git push step to not exit with an error status. This makes it difficult to use umpf push in a CI setup, where no one looks at job output if the job did not signal an error. Propagate the error code through cleanup to fix this. Reported-by: Leonard Göhrs Closes: https://github.com/pengutronix/umpf/issues/63 Signed-off-by: Ahmad Fatoum --- umpf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/umpf b/umpf index 1511e26..fddb73c 100755 --- a/umpf +++ b/umpf @@ -160,6 +160,8 @@ abort() { } cleanup() { + local ret=$? + if [ -n "${series_out}" ]; then exec {series_out}<&- unset series_out @@ -170,6 +172,8 @@ cleanup() { fi rm -rf "${GIT_DIR}/refs/umpf" rm -rf "${STATE}" + + return ${ret} } usage() {