Share this page

# UtilsA.isEnvExists

Checks the existence of a specified environment variable.

    UtilsA.isEnvExists(name);

## Arguments

name. (string) Name of the environment variable.

## Return value

A promise that is fulfilled with a boolean upon success.

Returns true if the specified environment variable exists, and false if it does not exist.

## Example

Copy code

    UtilsA.isEnvExists("PATH").then(function(exist){
      TCA.done(exist);  //exist is true
    }).catch(function (error) {
      TCA.doneWithError(error);
    });

    UtilsA.isEnvExists("TC_kukuku").then(function(exist){
      TCA.done(exist);   //exist is false
    }).catch(function (error) {
      TCA.doneWithError(error);
    });

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: