end
local _current_tool
-
--- Get current local tool name.
-- @param tool Optional new tool name.
-- @return Tool name
return _current_tool
end
+local _project_root
+--- Get (set) project root.
+-- @param project_root Optional. Set to specify project root.
+-- @return Project root directory.
+function e2tool.root(project_root)
+ if project_root then
+ assertIsStringN(project_root)
+ _project_root = project_root
+ end
+
+ assertIsStringN(_project_root)
+ return _project_root
+end
+
--- initialize the local library, load and initialize local plugins
-- @param path string: path to project tree (optional)
-- @param tool string: tool name (without the 'e2-' prefix)