You need single quotes round the variable name, otherwise NAnt will try to evaluate it as a property:
 
<property name="s2build01" value="${environment::get-variable('BUILD')}" /> 
 
I'm pretty sure that the environment variable lookup is not case sensitive so 'BUILD' and 'build' should both work.
 
HTH,
 
Bill
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Kevin Kirkpatrick
Sent: 06 June 2005 21:57
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] environment::get-variable usage

I have a really stupid question.  Is the correct usage for this function, environment::get-variable?

 

<!-- nant version 0.85.1642.0 -- >

<!-- to set property -->

 

<property name="s2build01"   value="${environment::get-variable(BUILD)}"/>

 

<!-- to call in .build -- >

 

<if test=”s2build01” >

 

</if>

 

 

Thanks.

Reply via email to