Skip to content

Commit 570acd8

Browse files
committed
doc: clarify process.loadEnvFile variable precedence (nodejs#66315)
1 parent fca40eb commit 570acd8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎doc/api/process.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2756,6 +2756,8 @@ changes:
27562756
27572757
Loads the `.env` file into `process.env`. Usage of `NODE_OPTIONS`
27582758
in the `.env` file will not have any effect on Node.js.
2759+
If a variable is already set in `process.env`, its existing value takes
2760+
precedence and is not overwritten by the value from the `.env` file.
27592761
27602762
```cjs
27612763
const { loadEnvFile } = require('node:process');

0 commit comments

Comments
 (0)