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=32069>. 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=32069 ant.bat corrupts ant exit status on WinXP SP2 Summary: ant.bat corrupts ant exit status on WinXP SP2 Product: Ant Version: 1.6.2 Platform: PC OS/Version: Windows XP Status: NEW Severity: Major Priority: Other Component: Wrapper scripts AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] For ant 1.6.2 on WinXP SP2, I noticed that the exit status is corrupted (changed from 0 to 1) if no command line args are specified. It appears that the act of unsetting _JAVACMD changes ERRORLEVEL (to 1) if and only if the variable was not previous set. My fix was to forcibly set the two variables being erased just prior to erasing them. It's pretty ugly, maybe there is a better way. I don't know if there are side-effects on other versions of Windows. FYI - here is how I patched my ant.bat file: ... :end :: BUGFIX/CB: (under WinXP at least), erasing a shell variable that was never :: set appears to modify ERRORLEVEL (it sets it to 1, perhaps to indicate that :: the erase was erroneous/unneeded). So we set each var to a DUMMY value to :: preserve the ant exit status. set _JAVACMD=DUMMY_VAL set _JAVACMD= set ANT_CMD_LINE_ARGS=DUMMY_VAL set ANT_CMD_LINE_ARGS= ... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]