title: Unable to use environment variables in Lua code
body: <p>I have some Lua code, which I use in my openresty nginx.conf file. This Lua code contains such lines:</p>
  
  <pre><code>...
  local secret = os.getenv("PATH")
  assert(secret ~= nil, "Environment variable PATH not set")
  ...
  </code></pre>
  
  <p>Just for testing reasons I tried to check if PATH variable is set and for some reason the assert statement does not pass. I see in the console:</p>
  
  <blockquote>
    <p>Environment variable PATH not set</p>
  </blockquote>
  
  <p>However, when I run this</p>
  
  <pre><code>$ echo $PATH
  </code></pre>
  
  <p>I see, that this variable indeed has some value. So, what is wrong with that and how can I fix it?</p>