DEV Community

Discussion on: External dependencies which read and act on environment variables?

Collapse
 
craser profile image
Chris Raser

I really like that wrapper script idea. Gonna put that in my toolbox for when I need it.

I agree that code that polls environment vars is old-school UNIX stuff that you just kind of get used to when you've been working on UNIX/Linux long enough. But I still think it's terrible. It's a global var, with all the problems that come with that.

I love the idea of a wrapper script to encapsulate and enumerate all the environmental settings for an application. It gives maintainers a chance to see what's needed, see comments about how it's used or why it's there, etc.