Closed NaikAayush closed 9 months ago
I think this would work.
expand({ ignoreProcessEnv: true, parsed: process.env })
yes, you can do what @ivandotv detailed.
also, keep an eye on dotenvx
. we are adding variable expansion to it soon https://github.com/dotenvx/dotenvx/issues/58. then you can wrap any server or command with dotenv. handy.
The project description mentions "If you find yourself needing to expand environment variables already existing on your machine, then dotenv-expand is your tool."
And after my exploration it seems like it's not for already existing environment variables. Raising this issue for confirmation on the same, is the description supposed to be "If you find yourself needing to expand environment variables already existing on your machine, then dotenv-expand is NOT your tool."?
Or is there a way to use this for already existing environment variables.