3 ms·
Environment variables also suck due to having zero typo existence. Write FOO_BAR instead of FOO_BARS? Silent failure. V1 of your package recognizes FOO_BAR and
by quotemstr 1y ago
Environment variables also suck due to having zero typo existence. Write FOO_BAR instead of FOO_BARS? Silent failure. V1 of your package recognizes FOO_BAR and V2 changes it to FOO_BARS (because now we can have more than one)? Silent failure.
- sgarland 1y agoIn a shell script, set -u. It’ll terminate if you reference an unset variable. In other languages, check that the var you pulled in isn’t falsey before proceeding.
- quotemstr 1y ago> In a shell script, set -u Won't help. I'm _running a program_ want to configure it with environment variables, not _writing a program_ that I expect the user to configure for himself. > falsey There are more than two programming languages in the world.
- sgarland 1y ago> There are more than two programming languages in the world. Great, then you know how to check it in your language of choice.