The config files are being read/executed in a sandbox. Hence the failure to 
access the `os` table.

I do see the usecase for `os.getenv`, but I'm no sandbox expert, so I'm 
hesitating because I don't know what malicious things one could do with this 
function exposed.

Anyone else maybe?

Thijs

> -----Original Message-----
> From: Fabio Porcedda [mailto:fabio.porce...@gmail.com]
> Sent: dinsdag 9 juni 2015 6:30
> To: luarocks-developers@lists.sourceforge.net
> Subject: [Luarocks-developers] Use an environment variable inside the
> config-5.1.lua
> 
> Hi all,
> 
> I need to use a linux environment variable inside the "config-5.1.lua"
> to set the "external_deps_dirs", I've used this istruction:
> 
> external_deps_dirs = { os.getenv("GCC_SYSROOT") }
> 
> but i got this error:
> 
> Error running file: [string
> "/home/tetsuya/buildroot/br/output/host/usr/..."]:15: attempt to index
> global 'os' (a nil value)
> 
> If i understand correctly the os library cannot be used in the
> "config-5.1.lua" file, there is some way to use it?
> 
> Thanks and best regards
> --
> Fabio Porcedda
> 
> ----------------------------------------------------------------------------
> --
> _______________________________________________
> Luarocks-developers mailing list
> Luarocks-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/luarocks-developers

------------------------------------------------------------------------------
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to