Open joselcvarela opened 2 years ago
I think we should make this issue in a more generic way, not just loading dotenv file. I suggest doing it similar to the way docker did: load env variables from .config file.
For example: zx --env-file=/foo/bar/cred.config script.mjs
You can use this
can i work on this feature?
latest node support process.loadEnvFile(envVarsPath);
out of the box
Can you please close this issue?
Expected Behavior
Support for dotenv files
Actual Behavior
Do not support dotenv files
Motivation
These files are specially useful in order to avoid to type same environment variables multiple times. In some cases, it also can be helpful to track them with a version controller.
That being said,
zx
could support this behaviour because:.env
files in any folderpackage.json
and install additional packages.env
fileRelated
https://github.com/google/zx/pull/327