# environment::variable-exists

Gets a value indicating whether the specified environment variable exists.

### Usage

`bool environment::variable-exists(name)`

### Parameters

Name | Type | Description
--- | --- | ---
name | string | The environment variable that should be checked.

### Return Value

true if the environment variable exists; otherwise, false.

### Examples

- Execute a set of tasks only if the "BUILD_DEBUG" environment variable is set.

                  <if test="${environment::variable-exists('BUILD_DEBUG')}">
                      ...
                  </if>

### Requirements

Assembly: NAnt.Core (0.91.4312.0)