installer: always clean up finalizer log bind

This commit is contained in:
Ryan Hughes committed 2026-05-23 10:30:53 -04:00
1 parent 6232620806
commit b16303f294
1 file changed
+1 -1
@@ -850,6 +850,7 @@ def run_chroot_finalizer(ctx: InstallContext) -> None:
with ctx.log_path.open("a", encoding="utf-8") as log: with ctx.log_path.open("a", encoding="utf-8") as log:
log.write(f"[orchestrator] WARNING: failed to bind unified finalizer log: {exc}\n") log.write(f"[orchestrator] WARNING: failed to bind unified finalizer log: {exc}\n")
try:
# 4: copy install tooling somewhere arch-chroot will not mask. /tmp is not # 4: copy install tooling somewhere arch-chroot will not mask. /tmp is not
# safe here: arch-chroot mounts a fresh tmpfs over the target's /tmp before # safe here: arch-chroot mounts a fresh tmpfs over the target's /tmp before
# running commands, so files copied to /mnt/tmp are invisible in the chroot. # running commands, so files copied to /mnt/tmp are invisible in the chroot.
@@ -902,7 +903,6 @@ def run_chroot_finalizer(ctx: InstallContext) -> None:
*env_extras, *env_extras,
"/bin/bash", str(tooling_path / "finalize.sh"), "/bin/bash", str(tooling_path / "finalize.sh"),
] ]
try:
subprocess.run(cmd, check=True) subprocess.run(cmd, check=True)
finally: finally:
sudoers.unlink(missing_ok=True) sudoers.unlink(missing_ok=True)