Request to add support for .envrc format
We are using https://direnv.net/ to share a base config and it works really well for that. Would be even better if we could reference the same file in our run configs.
Format is pretty simple:
export DB_NAME=abc export DB_HOSTNAME=www.hosts.com export DB_PORT=3333
Thanks!
It seems that this is pretty much the same as an .env file but ignoring/removing export strings at the beginning of a line?
That way, a shell script could source the .env file and sets the exports and this plugin can use it directly.
.envrc for direnv is bash script compatible.
So $ source .envrc is corect way to apply it.
I also think adding .envrc type support is very valuable!
Would love if #117 could get merged :)
I have no intention on merging #117 as it is right now.
I'm considering whether I'd agree to merge it if #117 included a feature toggle. That being said, it sounds like the right way to handle this is to add support for a new format type which would execute a given executable in a shell and then read the environment variables from it. Would welcome such contribution.
@ashald I implemented this functionality in the way you suggested. Would you review https://github.com/ashald/EnvFile/pull/160? Thanks!
While we don't have @shinichy's PR merged, my current workaround is to change the syntax of the .envrc file to:
DB_NAME=abc
DB_HOSTNAME=www.hosts.com
DB_PORT=3333
export DB_NAME DB_HOSTNAME DB_PORT
That way both direnv and EnvFile can load the file correctly.
As a fresh user of this plugin, I hit this issue. Any updates on this? @ashald It seems #160 is closed for some reason.
I was about to adopt EnvFile but this is making me reconsider.