Cancel/Abort Build from Script Build Step?

Is there a way to stop/cancel/abort the current target build from a Script Build Step via code? I have a pre-build script that does some stuff, and if the result of that is an error, I want to stop the build…but just for that target, not the full build process (so, for example, if I have ‘Windows’ and ‘This Computer’ selected, and the pre-build script fails for the Windows target, I want to stop the Windows build, but proceed with the ‘This Computer’ build).

There’s a command called CancelBuild. It works only in pre-build scripts.

If you want to cancel individual parts, you could create a script that triggers each build individually and do your error handling there.

Excellent! That should do the trick.

BTW, I didn’t see CancelBuild documented, at least not in the places I looked (User Guide, Language Reference, some online resources for IDE Scripting). Where is this mentioned? I want to see if I’m missing other useful stuff :slight_smile:

It doesn’t appear to be
It wont be in the language reference as IDE scripting is not the Xojo language