Skip to content

Commit c685695

Browse files
manjitksaduh95
authored andcommitted
doc: clarify process.loadEnvFile variable precedence (#66315)
Signed-off-by: manjit <manjitcse@gmail.com> PR-URL: #67276 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
1 parent 0c0d945 commit c685695

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)