[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Discover default package.path, package.cpath?
- From: nr@... (Norman Ramsey)
- Date: Wed, 02 Jan 2019 16:05:39 -0500
From within a Lua process that has already launched, is there a way to
discover the *default* paths, especially package.cpath?
Context: I have to treat the LUA_CPATH environment variable as if it
were controlled by an adversary, and I do not have the ability to
launch Lua with the -E option. My choices will be either to put some
kind of wrapper around my Lua binary or to launch a separate process
to determine the default path. Neither of these choices is ideal.
A solution for 5.1 would be perfect, but if it's doable even using a
later version, I might be able to retrofit.
Any ideas?
Norman