]> git.e2factory.org Git - e2factory.git/commitdiff
Repair e2lib.islocaltool(), look at the right place
authorTobias Ulmer <tu@emlix.com>
Mon, 18 Mar 2013 13:54:37 +0000 (14:54 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 18 Mar 2013 17:18:01 +0000 (18:18 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 3c8fbc248f097740eba95c260d9c56230ab31ba2..5a64951d39cf0acc957360b33774f64c34cb4519 100644 (file)
@@ -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