core
core copied to clipboard
Native support for .env files
Is your feature request related to a problem? Please describe.
@oclif/core should natively support .env files using process.loadEnvFile
Describe the solution you'd like
Call process.loadEnvFile at the beginning of run
using path set in settings
The call should be gated by a check for the node version to avoid any runtime errors.
This issue has been linked to a new work item: W-15694504
Is there any workaround for supporting .env files in oclif
?
You can you use dotenv in CLI's bin/run.js to load a .env file
You can you use dotenv in CLI's bin/run.js to load a .env file
@mdonnalley I see! I've already done this actually. 😄 But how can I make that work for the bin/run.cmd
bin file for Windows?
bin/run.cmd
just runs bin/run.js
so whatever you do in there should also work for windows