Skip to content

Get an environment variable (getenv)

License

Notifications You must be signed in to change notification settings

halon-extras/env

Repository files navigation

Environment variable plugin

Installation

Follow the instructions in our manual to add our package repository and then run the below command.

Ubuntu

apt-get install halon-extras-env

RHEL

yum install halon-extras-env

Exported functions

These functions needs to be imported from the extras://env module path.

getenv(name)

Get an environment variable as a string. If not found none is returned.

Params

  • name string - The environment variable name

Returns

The variable as a string. If not found none is returned.

Example

import { getenv } from "extras://env";
echo getenv("PATH");