lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Mar 26, 2014 at 4:41 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2014-03-26 10:28 GMT+02:00 steve donovan <steve.j.donovan@gmail.com>:
> On Wed, Mar 26, 2014 at 9:57 AM, Sean Conner <sean@conman.org> wrote:
>>
>>   I thought something like:
>>
>> #!/usr/bin/env lua -e "if _VERSION ~= 'Lua 5.3' then print('bad lua') return end" -
>>
>> would work, but apparently not ...
>
> But
>
> lua -e "if _VERSION ~= 'Lua 5.3' then print('bad lua'); os.exit(1) end" -
>
> does work, at least on Windows.

Is that useful? Consider this variation:

lua53 -e "if _VERSION ~= 'Lua 5.3' then print('Somebody has gained
malicious access to my computer'); os.exit(1) end"


The trouble with this solution (and several other examples) is that it requires *exactly* Lua 5.3, not 5.3 or greater.

--
Sent from my Game Boy.