aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/path.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/path.lua')
-rw-r--r--src/luarocks/path.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 8fe6da8d..8e82beeb 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -275,4 +275,16 @@ function path.read_namespace(name, version, tree)
275 return namespace 275 return namespace
276end 276end
277 277
278function path.package_paths(deps_mode)
279 local lpaths = {}
280 local lcpaths = {}
281 path.map_trees(deps_mode, function(tree)
282 local root = path.root_dir(tree)
283 table.insert(lpaths, dir.path(root, cfg.lua_modules_path, "?.lua"))
284 table.insert(lpaths, dir.path(root, cfg.lua_modules_path, "?/init.lua"))
285 table.insert(lcpaths, dir.path(root, cfg.lib_modules_path, "?." .. cfg.lib_extension))
286 end)
287 return table.concat(lpaths, ";"), table.concat(lcpaths, ";")
288end
289
278return path 290return path