From 5f0ddbfcd672810a88e7a4f99470666affb11fc9 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Mon, 18 Mar 2013 14:54:37 +0100 Subject: [PATCH] Repair e2lib.islocaltool(), look at the right place Signed-off-by: Tobias Ulmer --- generic/e2lib.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 -- 2.39.5