[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Commit error (Possible LUA problem)
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] Commit error (Possible LUA problem) |
Date: |
Mon, 15 Feb 2010 14:40:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-66.3 Lightning/1.0b2pre Thunderbird/3.0 |
Am 15.02.2010 13:59, schrieb Stephen Leake:
> Line 33 in std_hooks is the 'spawn' in:
>
> function execute(path, ...)
> local pid
> local ret = -1
> pid = spawn(path, unpack(arg))
> if (pid ~= -1) then ret, pid = wait(pid) end
> return ret
> end
>
> So it looks like the path to the executable is nil (should be 'vi', in
> this case). That is in turn specified by the environment variables
> "VISUAL" and "EDITOR" (see std_hooks edit_comment). If
> those env variables are null, it searches PATH for executables named
> 'editor' and 'vi'.
>
> So perhaps you have VISUAL or EDITOR set incorrectly. Or if they are
> not set, try setting them to a valid editor, that is in Cygwin PATH.
>
> On the other hand, the logic in edit_comment seems safe against bad
> env variables, so this is looking like a lua bug.
I don't think that path is not set, but that no arguments are given,
i.e. the magic "arg" variable is nil instead of a table as the error
message suggests. So either there are really no arguments given to this
function and this is where the error comes from, or lua has a faulty
interpretation of "arg".
Philipp, try to open lua from command line and enter
> function foo(...) return unpack(arg) end
> = foo(1,2,3)
Do you see
1 2 3
as output then? If yes, then its not a lua problem.
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature