This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

is the return code from app from user build step ignored?

I have a batch file that does a few things at the end of the build, such as converting a HEX
file to a BIN file; and if that works then doing additional steps.

The problem I'm experiencing is that if all of my user build steps pass (all done in a batch
file) then I return zero, otherwise I return a positive integer. I've instrumented my batch
file to show that when a failure is encountered the DOS batch file "EXIT" command is executed
to return a positive integer. However, the build result shows zero errors. My expectation
was that if a user build step returned a non-zero number that would make the build fail.

Is that not what's supposed to happen? If not, what does happen and what can I do to make the
build fail if a user build action fails (returns a non-zero value)?

To make a simple test I replaced my batch file contents with one line that just called EXIT,
like this:

EXIT /B 1

and the build succeeds with zero errors.

Anyone have any suggestions for how I can make the build fail when a user build step fails?

Thanks.