aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/path.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 17d9d52b..e613d112 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -309,7 +309,7 @@ end
309function map_trees(use_trees, fn, ...) 309function map_trees(use_trees, fn, ...)
310 local result = {} 310 local result = {}
311 if use_trees == "one" then 311 if use_trees == "one" then
312 table.insert(result, fn(cfg.root_dir, ...)) 312 table.insert(result, (fn(cfg.root_dir, ...)) or 0)
313 elseif use_trees == "all" or use_trees == "order" then 313 elseif use_trees == "all" or use_trees == "order" then
314 local use = false 314 local use = false
315 if use_trees == "all" then 315 if use_trees == "all" then
@@ -320,7 +320,7 @@ function map_trees(use_trees, fn, ...)
320 use = true 320 use = true
321 end 321 end
322 if use then 322 if use then
323 table.insert(result, fn(tree, ...)) 323 table.insert(result, (fn(tree, ...)) or 0)
324 end 324 end
325 end 325 end
326 end 326 end