4 ms·
In 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 proceed
by sgarland 1y ago
In 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.