mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 07:09:57 -04:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user