Skip to content

Commit 7fa5607

Browse files
manjitksaduh95
authored andcommitted
doc: clarify process.loadEnvFile variable precedence (#66315)
Signed-off-by: manjit <[email protected]> PR-URL: #67276 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
1 parent 064bae6 commit 7fa5607

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
@@ -2755,6 +2755,8 @@ changes:
27552755
27562756
Loads the `.env` file into `process.env`. Usage of `NODE_OPTIONS`
27572757
in the `.env` file will not have any effect on Node.js.
2758+
If a variable is already set in `process.env`, its existing value takes
2759+
precedence and is not overwritten by the value from the `.env` file.
27582760
27592761
```cjs
27602762
const { loadEnvFile } = require('node:process');

0 commit comments

Comments
 (0)