From: Tobias Ulmer Date: Mon, 18 Mar 2013 13:54:37 +0000 (+0100) Subject: Repair e2lib.islocaltool(), look at the right place X-Git-Tag: e2factory-2.3.13rc5~1 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=5f0ddbfcd672810a88e7a4f99470666affb11fc9;p=e2factory.git Repair e2lib.islocaltool(), look at the right place Signed-off-by: Tobias Ulmer --- diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 3c8fbc2..5a64951 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -1173,19 +1173,18 @@ function e2lib.isglobaltool(tool) end --- Check whether tool is an existing local e2factory tool. +-- Only works in a project context. -- @param tool Tool name such as 'e2-install-e2', 'e2-build' etc. --- @param projectdir Optional directory where the tool should be searched in. If --- not specified, the current working directory will be used. -- @return True or false -- @return Error object when false. -- @see isglobaltool -function e2lib.islocaltool(tool, projectdir) - local dir, re = e2lib.locate_project_root(projectdir) +function e2lib.islocaltool(tool) + local dir, re = e2lib.locate_project_root() if not dir then return false, re end - local tool = e2lib.join(dir, tool) + local tool = e2lib.join(dir, ".e2/bin", tool) if e2lib.isfile(tool) then return tool end