Bugs item #1234822, was opened at 2005-07-08 09:33
Message generated for change (Comment added) made by steve_coombes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1234822&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
Submitted By: Ashley Moran (ashleymoran)
Assigned to: Nobody/Anonymous (nobody)
Summary: <exec>'s <arg/> evaluates even when if attr returns false

Initial Comment:
I use a lot of properties to control the flow of my
scripts (like a configuration file.  But the following
(contrived) example will fail:

<property name="foo-defined" value="true"/>
<property name="foo" value="hello"/>
<property name="bar-defined" value="false"/>

<exec program="mycmd">
    <arg if="${foo-defined}"
line="${properties::get-value('foo')}"/>
    <arg if="${bar-defined}"
line="${properties::get-value('bar')}"/>
</exec>

because ${properties::get-value('bar')} can't be evaluated

It would make more sense if the argument line was only
evaluated if the "if" expression evaluated to true

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

Comment By: Steve C. (steve_coombes)
Date: 2005-09-27 10:52

Message:
Logged In: YES 
user_id=1320427

I ran into a similar issue today within the <echo> task, where 
I only wanted to echo the value of an externally-ran devenv 
compile if I actually ran the compile. Code snippet:

                                <exec 
program="devenv" commandline="${BaseDir}\
\.sln /build debug /out ${BuildLogDir}
\K2BizTalkDebugCompile.log" resultproperty="compile.result" 
append="true" unless="${Config == 'release'}"/>
                                <echo 
message="compile.result = ${compile.result}" 
unless="${Config == 'release'}"/>
                                <if 
test="${int::parse(compile.result) != 0}">
                                        <fail 
message="${ModuleName}.sln debug config compile using 
devenv failed!"/>
                                </if>

Later in the same script I do the same check for running a 
Release config build. If I run a Release only, this script fails 
because the compile.result value is not set until the first time 
I run devenv.

Please correct this so that the if / unless evaluation is 
conducted before evaluating the inside properties of the 
command itself. Thanks!

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

Comment By: Eugene Voytitsky (viy75)
Date: 2005-07-29 05:25

Message:
Logged In: YES 
user_id=703472

I vote for this bug
please fix it

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

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


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to