Summary
Gets a value indicating whether the specified environment variable
exists.
Syntax
[Function("variable-exists")]
public static bool VariableExists(string name)
Examples
Execute a set of tasks only if the "BUILD_DEBUG" environment
variable is set.
<if test="${environment::variable-exists('BUILD_DEBUG')}">
...
</if>
Attributes
Type |
Description |
FunctionAttribute |
Indicates that the method should be exposed as a function in NAnt build
files.
|
Parameters
Name |
Type |
Description |
name |
string |
The environment variable that should be checked. |
Return Value
Type |
Description |
bool |
true if the environment variable exists; otherwise,
false .
|