Open coolaj86 opened 4 years ago
Why not (source .env && someprogram --foo bar)
? (requires using export
in your .env
files to make them shell-compatible, which dotenv
accepts too. use .
instead of source
if you're using sh
.)
It's not a cross-platform approach.
That's true but every platform offers built-in tools to read ENV vars from a file
It requires a shell, which you don't always have with service managers like systemd.
Most service manager already support reading env vars from a file. For systemd, there is EnvironmentFile
It would be really awesome to have this as a binary that could run like this:
Do you have any interest in supporting that? I'd be willing to help.