env-cmd icon indicating copy to clipboard operation
env-cmd copied to clipboard

Shell temporary environment variables support

Open lucapollani opened this issue 3 years ago • 0 comments

Are shell temporary environment variables supported? As described in Create React App documentation, I expected something similar: https://create-react-app.dev/docs/adding-custom-environment-variables/#adding-temporary-environment-variables-in-your-shell

This is a sample of my package.json

"scripts": {
    "start": "env-cmd -e default,development react-app-rewired start",
    [...]
 }

Should then the command (for Windows CMD in this case) work? If not It would be a great enhancement set "REACT_APP_NOT_SECRET_CODE=abcdef" && yarn start

So the variable REACT_APP_NOT_SECRET_CODE set via shell should take precedence over the definitions of env-cmd

lucapollani avatar Apr 20 '21 06:04 lucapollani