Created attachment 21787 [details] A patch that always fails when the patch command fails. The <patch> task does not fail if the invocation of the patch command fails. Attached are two patches for <patch>: 1. A patch that simply fails the build when the patch command returns a failure result code. This patch changes the default behavior of patch to fail when the patch command fails, which I think is a good thing but may not be the prevailing wisdom of the Ant project since nearly nothing fails on error by default. 2. A patch that adds a "failOnError" attribute to the <patch> task which defaults to false, but when set to true fails the build when the patch command returns a failure result code. Actually, it seems that I can only add a single attachment. I will add the first attachment and then hopefully there will be a way to add additional attachments once I file this report.
Created attachment 21788 [details] A patch that introduces a failOnError attribute to <patch>. This and the previous patch are against the 20080407 nightly code snapshot.
svn revision 695779 contains your second patch since backwards compatibility sometimes is more important than having the correct defaults.
*** Bug 23540 has been marked as a duplicate of this bug. ***