From 95983adc6e48f49965cd66a25aaafb00078733b1 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 25 Mar 2025 11:08:51 +0000 Subject: [PATCH] build: Don't drop into a shell when build has been interrupted Signed-off-by: Michael Tremer --- src/pakfire/build.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/pakfire/build.c b/src/pakfire/build.c index b540122d..1d1dfe51 100644 --- a/src/pakfire/build.c +++ b/src/pakfire/build.c @@ -2269,9 +2269,17 @@ static int pakfire_build_perform(struct pakfire_build* build, return 0; ERROR: - // Drop to a shell for debugging - if (pakfire_build_has_flag(build, PAKFIRE_BUILD_INTERACTIVE)) - pakfire_build_shell(build, NULL, NULL); + // Drop to a shell for debugging unless the user has interrupted the build + switch (r) { + // SIGINT + case 130: + break; + + default: + if (pakfire_build_has_flag(build, PAKFIRE_BUILD_INTERACTIVE)) + pakfire_build_shell(build, NULL, NULL); + break; + } return r; } -- 2.39.5