Bugs item #1156313, was opened at 2005-03-03 15:50
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=1156313&group_id=31650
Category: Tasks
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Submitted By: Cyblix (cyblix)
Assigned to: Nobody/Anonymous (nobody)
Summary: property gets expanded prior to if test in exec task's arg
Initial Comment:
The uploaded file demonstrates the bug. Here is a copy:
<?xml version="1.0" encoding="utf-8" ?>
<project name="bug">
<exec program="cmd.exe">
<arg value="/c" />
<arg value="echo" />
<arg value="${hello}"
if="${property::exists('hello')}" />
<arg value="ah" />
</exec>
</project>
I expect nant to not evaluate ${hello} when the test in
the if attribute fails. Here follows the output of a couple
of trial runs:
C:\auto-build>nant
NAnt 0.85 (Build 0.85.1888.0; nightly; 3/3/2005)
Copyright (C) 2001-2005 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/auto-build/bug.build
Target framework: Microsoft .NET Framework 1.1
BUILD FAILED
C:\auto-build\bug.build(6,4):
Property evaluation failed.
Expression: ${hello}
^^^^^
Property 'hello' has not been set.
Total time: 0 seconds.
C:\auto-build>nant -D:hello=print
NAnt 0.85 (Build 0.85.1888.0; nightly; 3/3/2005)
Copyright (C) 2001-2005 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/auto-build/bug.build
Target framework: Microsoft .NET Framework 1.1
[exec] print ah
BUILD SUCCEEDED
Total time: 0.1 seconds.
C:\auto-build>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1156313&group_id=31650
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers