aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/deps.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/luarocks/deps.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index e61425f6..f4c04c35 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -446,7 +446,6 @@ local function check_external_dependency_at(prefix, name, ext_files, vars, dirs,
446 else 446 else
447 paths = { dir.path(prefix, dirdata.subdir) } 447 paths = { dir.path(prefix, dirdata.subdir) }
448 end 448 end
449 dirdata.dir = paths[1]
450 local file_or_files = ext_files[dirdata.testfile] 449 local file_or_files = ext_files[dirdata.testfile]
451 if file_or_files then 450 if file_or_files then
452 local files = {} 451 local files = {}
@@ -512,6 +511,17 @@ local function check_external_dependency_at(prefix, name, ext_files, vars, dirs,
512 if not found then 511 if not found then
513 return nil, dirname, dirdata.testfile 512 return nil, dirname, dirdata.testfile
514 end 513 end
514 else
515 -- When we have a set of subdir suffixes, look for one that exists.
516 -- For these reason, we now put "lib" ahead of "" on Windows in our
517 -- default set.
518 dirdata.dir = paths[1]
519 for _, p in ipairs(paths) do
520 if fs.exists(p) then
521 dirdata.dir = p
522 break
523 end
524 end
515 end 525 end
516 end 526 end
517 527