[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: RFE: cmdline option to ignore LUA_INIT
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Wed, 27 Jul 2011 23:57:12 +0200
On 27/07/2011 22.57, Ignacio BurgueÃo wrote:
Tried that, but it solves only the path setting problem. I have other
code in the "system-wide" init script pointed to by INIT_LUA, and that
code is executed anyway. I'd like to bypass it completely, i.e. prevent
On Wed, Jul 27, 2011 at 5:50 PM, Lorenzo Donati
<email@example.com <mailto:firstname.lastname@example.org>> wrote:
Lately I've been struggling to force Lua interpreter to ignore
LUA_INIT (on Windows). Since I hate to put shell invocation scripts
everywhere (.cmd files, I mean) to set LUA_INIT to an empty value,
I'd like to be able to invoke the interpreter like this:
lua --noinit myscript.lua
(I'm thinking to do the mod myself, but maybe this may be useful in
general and may be worth adding to the standard distro).
Anyway, if someone has already a smart solution for this problem
(i.e. that doesn't involve modifying the source), I'll be glad to
have any pointer.
lua -e"package.path='';package.cpath=''" myscript.lua
Will that do?
It's more verbose than the --init flag, but I think it does what you need.
Moreover I have several builds of lua in my system (one bare-bone
PUC-5.1.4, one with a customized interpreter, one 5.2beta, plus several
ones used to start specific standalone tools) when testing one of those
I always have to wrap the invocation in some .cmd script otherwise
LUA_INIT gets in the way. The command line option would simplify things
really A LOT.