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=31805>. 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=31805 ExecTask executes checkConfiguration() even though os does not match Summary: ExecTask executes checkConfiguration() even though os does not match Product: Ant Version: 1.6.1 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have the following task: <property name="windows.specific" value="Windows XP, Windows 2000, Windows NT"/> <property name="linux.specific" value="Linux"/> <target name="test-os-name"> <echo>${os.name}</echo> <exec dir="${basedir}" os="${windows.specific}" executable="ls"> <arg line="-ltr"/> </exec> <exec dir="${env.HOME}/khub/build" os="${linux.specific}" executable="ls"> <arg line="-ltr"/> </exec> </target> The first exec should run on windows, the second should run on linux. The problem is, in the second exec the directory only exists on linux, not on windows. However this method checks for the directory before the os: public void execute() throws BuildException { File savedDir = dir; // possibly altered in prepareExec cmdl.setExecutable(resolveExecutable(executable, false)); checkConfiguration(); if (isValidOs()) { try { runExec(prepareExec()); } finally { dir = savedDir; } } } Seems like the checkConfiguration() should be run after the isValidOs(). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]