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.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 5e380992..cfe06118 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -313,6 +313,13 @@ function use_tree(tree)
313 cfg.deploy_lib_dir = deploy_lib_dir(tree) 313 cfg.deploy_lib_dir = deploy_lib_dir(tree)
314end 314end
315 315
316--- Apply a given function to the active rocks trees based on chosen dependency mode.
317-- @param deps_mode string: Dependency mode: "one" for the current default tree,
318-- "all" for all trees, "order" for all trees with priority >= the current default,
319-- "none" for no trees (this function becomes a nop).
320-- @param fn function: function to be applied, with the tree dir (string) as the first
321-- argument and the remaining varargs of map_trees as the following arguments.
322-- @return a table with all results of invocations of fn collected.
316function map_trees(deps_mode, fn, ...) 323function map_trees(deps_mode, fn, ...)
317 local result = {} 324 local result = {}
318 if deps_mode == "one" then 325 if deps_mode == "one" then