]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Strip --suspend from --debug-shell sandbox 3496/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 11 Feb 2025 17:01:17 +0000 (18:01 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 11 Feb 2025 17:01:17 +0000 (18:01 +0100)
mkosi/run.py

index 29f4126f7a8380d0294d7d08ccf225b14fa42082..928634e36ed6477710cca610a78e6814db766a33 100644 (file)
@@ -243,7 +243,9 @@ def spawn(
                 log_process_failure(prefix, cmd, returncode)
             if ARG_DEBUG_SHELL.get():
                 subprocess.run(
-                    [*prefix, "bash"],
+                    # --suspend will freeze the debug shell with no way to unfreeze it so strip it from the
+                    # sandbox if it's there.
+                    [s for s in prefix if s != "--suspend"] + ["bash"],
                     check=False,
                     stdin=sys.stdin,
                     text=True,