From ae48779d973b43b30ab2ea6cbd3a75cd19c17070 Mon Sep 17 00:00:00 2001 From: manjit singh <39226362+manjitks@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:03:48 +0530 Subject: [PATCH] doc: clarify process.loadEnvFile variable precedence (#66315) Signed-off-by: manjit PR-URL: https://github.com/nodejs/node/pull/67276 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Daijiro Wachi --- doc/api/process.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index 45b310c6872..ec1500eaed4 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2755,6 +2755,8 @@ changes: Loads the `.env` file into `process.env`. Usage of `NODE_OPTIONS` in the `.env` file will not have any effect on Node.js. +If a variable is already set in `process.env`, its existing value takes +precedence and is not overwritten by the value from the `.env` file. ```cjs const { loadEnvFile } = require('node:process');