diff --git a/doc/api/cli.md b/doc/api/cli.md index 10ade9da2bd4482..07a0c7b6f6241a0 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1847,6 +1847,10 @@ Modules preloaded with `--require` will run before modules preloaded with `--imp > Stability: 1.1 - Active development @@ -1887,6 +1891,13 @@ are: * Running `pre` or `post` scripts in addition to the specified script. * Defining package manager-specific environment variables. +#### Environment variables + +The following environment variables are set when running a script with `--run`: + +* `NODE_LIFECYCLE_EVENT`: The name of the script being run. For example, if + `--run` is used to run `test`, the value of this variable will be `test`. + ### `--secure-heap=n`