nginx configuration:
```
env RESTY_GITWEB=;
env RESTY_GITWEB_ENV=PROD;
env RESTY_GITWEB_CONFIG="/etc/
joshstock.in/resty-gitweb.yaml";
...
http {
...
init_by_lua_file "/home/josh/repos/resty-gitweb/init.lua";
```
In init.lua:
```
ngx.log(ngx.ERR,
"RESTY_GITWEB: \""..os.getenv("RESTY_GITWEB").."\", ",
"RESTY_GITWEB_ENV: \""..os.getenv("RESTY_GITWEB_ENV").."\", ",
"RESTY_GITWEB_CONFIG: \""..os.getenv("RESTY_GITWEB_CONFIG").."\"")
```
Attempting to start nginx/OpenResty produces this in the error.log:
```
[lua] init.lua:20: RESTY_GITWEB: "", RESTY_GITWEB_ENV: "",
RESTY_GITWEB_CONFIG: ""
```
OpenResty actually reads these environment variables as "", not nil as
happens when unset. i.e. os.getenv() in OpenResty can identify which
variables are set but can't read any of their values.
Am I doing something wrong or is this a bug in OpenResty?
Using nginx 1.19.6 built with lua-nginx-module@138c1b96 and
lua-resty-core@3b4ad75
--
Josh Stockin <
jo...@joshstock.in>
<
https://joshstock.in>