From: Daan De Meyer Date: Thu, 11 Jan 2024 07:55:13 +0000 (+0100) Subject: Log before going into debug shell X-Git-Tag: v20.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04d8c5aa813c8c58d76fe78f5bc428c22ce8f146;p=thirdparty%2Fmkosi.git Log before going into debug shell Fixes #2269 --- diff --git a/mkosi/run.py b/mkosi/run.py index 85c8a8cb1..c72ed4eca 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -313,6 +313,8 @@ def run( except FileNotFoundError as e: die(f"{e.filename} not found.") except subprocess.CalledProcessError as e: + if log: + log_process_failure(cmdline, e.returncode) if ARG_DEBUG_SHELL.get(): subprocess.run( [*sandbox, "sh"], @@ -325,8 +327,6 @@ def run( cwd=cwd, preexec_fn=preexec, ) - if log: - log_process_failure(cmdline, e.returncode) # Remove the sandboxing stuff from the command line to show a more readable error to users. e.cmd = cmdline raise