Skip to content

Commit 01fb118

Browse files
author
atmakuri-dhanush
committed
docs: add missing CLI options to manpage and cli docs
1 parent 4451309 commit 01fb118

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

doc/api/cli.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,19 @@ export USERNAME="nodejs" # will result in `nodejs` as the value.
956956
If you want to load environment variables from a file that may not exist, you
957957
can use the [`--env-file-if-exists`][] flag instead.
958958

959+
#### `--env-file`
960+
Loads environment variables from the provided file and applies them to the current process environment.
961+
If the file does not exist, Node.js will exit with an error.
962+
963+
#### `--env-file-if-exists`
964+
Same as `--env-file` but does not error when the file is missing.
965+
Useful for optional `.env` setups.
966+
967+
#### `--report-dir`, `--report-directory`
968+
Specifies the directory where diagnostic reports will be written.
969+
If the directory does not exist, Node.js will attempt to create it.
970+
971+
959972
### `-e`, `--eval "script"`
960973

961974
<!-- YAML

doc/node.1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,3 +927,14 @@ Documentation:
927927
.Pp
928928
GitHub repository and issue tracker:
929929
.Sy https://github.com/nodejs/node
930+
.TP
931+
.B --env-file
932+
Load environment variables from the specified file. Node.js exits with an error if the file does not exist.
933+
934+
.TP
935+
.B --env-file-if-exists
936+
Load environment variables from the specified file if it exists. No error is thrown when the file is missing.
937+
938+
.TP
939+
.B --report-dir, --report-directory
940+
Set the directory where diagnostic reports are written. Node.js may create the directory if it does not exist.

0 commit comments

Comments
 (0)