C? Y u no Rust?
Show HN: Dotenv, if it is a Unix utility
61–70 of 108 posts
Re: Show HN: Dotenv, if it is a Unix utility
#62export $(cat .env | xargs) Agree with the premise but this can be achieved with actual Unix concepts no need for anything else. The language runtime dotenv projects are banned in my engineering org.
Re: Show HN: Dotenv, if it is a Unix utility
#63Re: Show HN: Dotenv, if it is a Unix utility
#64Earlier quoted context omitted.
What happens when, 30 commands later, you execute a command in your shell and didn't remember that message from a day or so ago?
It’s the same as forgetting you put something in your .profile or .bashrc, no? In any case, both forgetting the env config and using the same shell for days in a row seem like two things that probably don’t coincide too often.
Re: Show HN: Dotenv, if it is a Unix utility
#65I think direnv already does a good job in this space, and it's already available in your package manager. https://direnv.net/
Re: Show HN: Dotenv, if it is a Unix utility
#66Earlier quoted context omitted.
What a tragic state of affairs. It's a shame that running modern software requires carefully packaging a virtual environment and then injecting a bunch of ugly global env vars. I still think Docker shouldn't exist. Programs should simply bundle their dependencies. Running a program should be as simple as download, unzip, run. No complex hierarchical container management needed. Alas I am not King.
Docker is "programs bundling their dependencies".
Re: Show HN: Dotenv, if it is a Unix utility
#67Re: Show HN: Dotenv, if it is a Unix utility
#68Earlier quoted context omitted.
GPT-4 is not a static code analyser
These LLMs are not a lot of things that people think they can use them for, apparently. Therapist, search engine, cheap coding labour, the list goes on. These LLMs produce syntacticly valid language, no more. And information contained within is a by-product and not necessarily factual nor correct.
It’s not necessarily factual or correct, no. But it’s incredibly helpful and useful. As always, the real answer is somewhere in the middle.
Just don’t ask it about politics. It’s so blatantly obviously biased.
Re: Show HN: Dotenv, if it is a Unix utility
#69Earlier quoted context omitted.
I tend to agree, and we do this a lot actually. But it gets a little more complicated if you have several .env files. Would love to hear more about why dotenv is banned at your org though.
Because I banned it haha. There should not be more than one .env file. Our projects have a .env.example that has any overrides a dev might want to override but this list is kept intentionally very short. Meanwhile .env is noted in gitignore. I absolutely hate seeing an entire application configured with environment variables. Some? Sure, where it makes sense. Most? No, those should be in version control, secrets asid…
Re: Show HN: Dotenv, if it is a Unix utility
#70There is also shdotenv that allows you to load different .env file formats and convert between them, e.g. for UNIX shell. https://github.com/ko1nksm/shdotenv