Functions for Environment-Related Tasks

  • getEnv(variable name, getExpanded)

    Returns the value of the environment variable name.

    Name Description
    variable name Name of environment variable. (String)
    getExpanded (optional) true: If the value contains reference to other variables, get the expanded value. (default)

    false: Get the value as is with no extra expansion applied.

    (Boolean)

    return value Value of the environment variable (might be nil, if not set) (String)
  • setEnv(variable name, value, forceOverwrite)

    Modifies the environment variable variable name to the specified value.

    Name Description
    variable name Name of environment variable. (String)
    value Value to be prepended.

    (String)

    forceOverWrite

    (optional)

    parname: Always set the value. Overwrite if variable already exists.

    false: Only set the value if variable does not exist. (default)

    (Boolean)

    return value -
  • prependEnv(variable name, value, delimReq)

    Prepends (or sets, if not exists) the environment variable variable name with the specified value.

    Name Description
    variable name Name of environment variable. (String)
    value Value to be prepended.

    (String)

    delimReq

    (optional)

    Delimiter character/string to be used to separate values when concatenating (operating system default will be used, if not exists)

    (String)

    return value -
  • appendEnv(variable name, value, delimReq)

    Appends (or sets, if not exists) the environment variable variable name with the specified value .

    Name Description
    variable name Name of environment variable. (String)
    value Value to be appended.

    (String)

    delimReq

    (optional)

    Delimiter character/string to be used to separate values when concatenating (operating system default will be used, if not exists)

    (String)

    return value -