From 1196448719bb6fb7e14d1aa79e22b9d21a5eab1a Mon Sep 17 00:00:00 2001 From: chrg6 Date: Sun, 8 Nov 2026 08:54:29 -0500 Subject: [PATCH] Stop a build that Cancel was pressed for before it started. Cancel while the tools were checked (before make_game.py started) set the flag but found no process to stop, and the 10 to 25 minute build then ran anyway until Cancel was pressed again. The job now stops before starting the build, and stops one Cancel caught as it started. Co-Authored-By: Claude Opus 5.5 --- launcher/jobs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/launcher/jobs.py b/launcher/jobs.py index 78281844..2a7dd00f 100644 --- a/launcher/jobs.py +++ b/launcher/jobs.py @@ -239,7 +239,13 @@ class Job: elif kind == 'error': self.error = ev.get('message', '') + # Cancel pressed before the build started (while the tools were checked) found no process to stop: it stops + # here, and one pressed while the process starts stops it at once + if self.cancelled(): + raise net.Cancelled() self.proc = build.Run(build.command(self.ctx.layout, args), on_event, self.log) + if self.cancelled(): + self.proc.cancel() code = self.proc.wait() err = self.proc.error self.proc = None