Affected URL(s)
https://nodejs.org/docs/latest/api/process.html#processloadenvfilepath
Description of the problem
The documentation for process.loadEnvFile(path) states that the .env file is loaded into process.env, but does not document what happens when a variable already exists in process.env.
The --env-file documentation states that an existing environment variable takes precedence over a value from the file.
process.loadEnvFile() appears to have the same behaviour, but this is not stated in its API documentation.
Please document the precedence behaviour for process.loadEnvFile(), for example:
If a variable is already defined in process.env, its existing value takes precedence and is not overwritten by the value from the .env file.
Affected URL(s)
https://nodejs.org/docs/latest/api/process.html#processloadenvfilepath
Description of the problem
The documentation for
process.loadEnvFile(path)states that the.envfile is loaded intoprocess.env, but does not document what happens when a variable already exists inprocess.env.The
--env-filedocumentation states that an existing environment variable takes precedence over a value from the file.process.loadEnvFile()appears to have the same behaviour, but this is not stated in its API documentation.Please document the precedence behaviour for
process.loadEnvFile(), for example: