Stopping cesium ant build on errors

When doing a build of Cesium (eg: ant combine), it does not stop if it finds sintax errors.
Since this check is one of the first things the build does, it will get buried on everything else, and anyway, there’s no point in continuing the build if sintax errors were found.
I tried to modify the build.xml by adding failonerror=“true”, but had no sucess, any tips?

I looked into this briefly and discovered that the r.js optimizer does not correctly set the exit code when an error occurs. I opened to track the problem.

Once that’s fixed, failonerror=“true” should work.