issues
search
toddbluhm
/
env-cmd
Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k
stars
65
forks
source link
dollar sign substitution is not working if the .env file is located in a custom path
#362
Open
KooWeiHao
opened
1 year ago
KooWeiHao
commented
1 year ago
In a react project
An environment file named as .env.uat is located at ./env.
In the environment file, there's a variable with dollar sign value. Eg: REACT_APP_TEST=${TEST}
The "start" script is having the following command, "env-cmd -f ./env/.env.uat react-scripts start".
Run the "start" script as follow, "TEST=HELLO npm run start".
However, the value shown in the app is "${TEST}", instead of "Hello".
In a react project