3 ms·
You can't source an .env file without some munging. All the keys would need `export` in front of them I believe.
by steezeburger 2y ago
You can't source an .env file without some munging. All the keys would need `export` in front of them I believe.
- kazinator 2y agoA sourced .env would have to be correct shell syntax for a sourced environment file, yes.
- maple3142 2y agoBut a lot of env file doesn't do that iirc. `allexport` solves this though.
- prmoustache 2y agoYou can implement that in a simple shell function anyway.
- prmoustache 2y agoThat doesn't seem like a huge barrier compared to shipping a dotenv binary compiled specifically to all deployment arch.
- steezeburger 2y agoIt's not a huge barrier, but it's still a barrier. I have lots of infra using Helm/K8s, sometimes Docker. These .env files don't have `export` keywords in them. So your suggestion is to munge these for local development. And you're okay with that barrier? That's terrible dx, and it adds surface area for bugs.