mastodon / flodgatt

A blazingly fast drop-in replacement for the Mastodon streaming API server
GNU Affero General Public License v3.0
86 stars 8 forks source link

Treat env vars set to "" as if they were unset #73

Closed codesections closed 4 years ago

codesections commented 4 years ago

This PR causes Flodgatt to treat environmental variables set to the empty string ("") as though they were unset—meaning that Flodgatt will use the default value for that variable rather than using the empty string.

This change means that it is no longer possible to set environmental variables to the empty string, which is why this behavior was not in the prior version of Flodgatt. However, many shells do not make it easy to unset environmental variables and users frequently "unset" them by setting them to the empty string. Thus, it seems better to treat empty environmental variables as though they were unset. https://unix.stackexchange.com/questions/27708/is-there-a-difference-between-setting-an-environment-variable-to-the-empty-strin