diff --git a/doc/api/cli.md b/doc/api/cli.md index b7ade9ffbe09b1..ad080e559987e1 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1857,6 +1857,10 @@ Modules preloaded with `--require` will run before modules preloaded with `--imp > Stability: 1.1 - Active development @@ -1897,6 +1901,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_RUN_SCRIPT_NAME`: 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`