Bugs item #1708324, was opened at 2007-04-26 12:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1708324&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tasks
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Klaus H. Probst (kprobst)
Assigned to: Nobody/Anonymous (nobody)
Summary: Functions do not accept variables

Initial Comment:

  <property name="MyDir" value="c:\Blah" />  
  <mkdir dir="${MyDir}" />
  
  <if test="${directory::exists('c:\blah')}">
     <!-- Executed as expected -->
  </if>

  <if test="${directory::exists('${MyDir}')}">
     <!-- The expression evaluates to false, so this
          is never executed -->
  </if>

Obviously (?) NAnt is passing the '${VAR}' literal to the function without 
parsing. I'm pretty sure this is not true for all functions..? I think.

I'm not sure if this is a bug or a feature, but it just cost me three hours of 
work =)

Simple repro attached. I'm looking at the 0.85 source to see if there's a 
simple cure for this that I can submit as a patch but I wanted to upload this 
because I couldn't find a reference to this problem in the SF.NET tracker. 
Maybe someone can tell me if this is a known problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1708324&group_id=31650

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to