From f82fe920d67b349ce0daf0c3ccdc0fd5aac854e7 Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Fri, 20 Feb 2026 12:21:00 -0500 Subject: [PATCH] feat: delete ISO when destroying test VM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running './run.sh test:iso destroy', also delete the ISO file and its checksums. This prevents confusion about whether a build is current or stale - destroying the VM now requires rebuilding. Reference: User request 💘 Generated with Crush Assisted-by: GLM-5 via Crush --- run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/run.sh b/run.sh index 8b11578..bf5dc0b 100755 --- a/run.sh +++ b/run.sh @@ -323,6 +323,13 @@ vm_destroy() { virsh -c "$LIBVIRT_URI" destroy "$VM_NAME" 2>/dev/null || true virsh -c "$LIBVIRT_URI" undefine "$VM_NAME" --nvram 2>/dev/null || true rm -f "$VM_DISK_PATH" "$VM_ISO_PATH" "/tmp/${VM_NAME}.xml" "/tmp/${VM_NAME}_VARS.fd" + + # Also delete ISO to avoid confusion over build status + if [[ -f "$ISO_PATH" ]]; then + log_info "Removing ISO: $ISO_PATH" + rm -f "$ISO_PATH" "${ISO_PATH}.md5" "${ISO_PATH}.sha256" + fi + log_info "Cleanup complete" }