From: Michael Tremer Date: Sat, 20 Nov 2021 16:32:06 +0000 (+0000) Subject: pakfire-builder: Forward shell exit code X-Git-Tag: 0.9.28~865 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7aedf3f487fa6e4d9cd88fb3400d3058587b674;p=pakfire.git pakfire-builder: Forward shell exit code Signed-off-by: Michael Tremer --- diff --git a/src/scripts/pakfire-builder.in b/src/scripts/pakfire-builder.in index e421c456e..de4f37f00 100644 --- a/src/scripts/pakfire-builder.in +++ b/src/scripts/pakfire-builder.in @@ -28,6 +28,7 @@ import tempfile import uuid import pakfire +import pakfire.errors import pakfire.logger from pakfire.constants import CONFIG_DISTRO_DIR from pakfire.i18n import _ @@ -304,7 +305,12 @@ class Cli(object): # XXX Handle packages to install # XXX Handle private network and other arguments - p.shell() + try: + p.shell() + + # Exit program with the shell's exit code + except pakfire.errors.CommandExecutionError as e: + return e.args[0] if __name__ == "__main__":