DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42828>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42828 Summary: Preserve return code of called batch files from exec task Product: Ant Version: 1.7.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: enhancement Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] For the WinNT platform, if a batch script is called from the <exec> task normally any batch error codes aren't propagated back to ant from the command shell. This causes a lot of headaches for those who expect or want an "exit /b 1" command to cause ant to fail the build process. I've been getting around this by using a very simple batch wrapper when I exec a batch file. It simply takes the return code from the wrapped batch file and exits the shell with the same code. I'm thinking that it's not too big of a job to hack the exec task to automatically use a wrapper such as this anytime a "*.cmd" or "*.bat" is set as the executable on a winnt platform. In the interests of backwards compatibility this would be an option that defaults off, but in the interests of saving traffic on the mail lists, and making ant do what most people expect out of the box, I'd vote to have this on by default... -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]