aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/build/builtin.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua
index cd4d4486..33e19c6b 100644
--- a/src/luarocks/build/builtin.lua
+++ b/src/luarocks/build/builtin.lua
@@ -321,7 +321,13 @@ function builtin.run(rockspec, no_install)
321 local sources = info.sources 321 local sources = info.sources
322 if info[1] then sources = info end 322 if info[1] then sources = info end
323 if type(sources) == "string" then sources = {sources} end 323 if type(sources) == "string" then sources = {sources} end
324 if type(sources) ~= "table" then
325 return nil, "error in rockspec: module '" .. name .. "' entry has no 'sources' list"
326 end
324 for _, source in ipairs(sources) do 327 for _, source in ipairs(sources) do
328 if type(source) ~= "string" then
329 return nil, "error in rockspec: module '" .. name .. "' does not specify source correctly."
330 end
325 local object = source:gsub("%.[^.]*$", "."..cfg.obj_extension) 331 local object = source:gsub("%.[^.]*$", "."..cfg.obj_extension)
326 if not object then 332 if not object then
327 object = source.."."..cfg.obj_extension 333 object = source.."."..cfg.obj_extension