Re: Could we have elegant version requirement from 5.3 on?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Could we have elegant version requirement from 5.3 on?
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2014年3月26日 10:41:22 +0200
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"