diff options
-rw-r--r-- | src/luarocks/loader.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/loader.lua b/src/luarocks/loader.lua index a41cec58..c8259689 100644 --- a/src/luarocks/loader.lua +++ b/src/luarocks/loader.lua | |||
@@ -112,8 +112,8 @@ function loader.add_context(name, version) | |||
112 | for _, tree in ipairs(loader.rocks_trees) do | 112 | for _, tree in ipairs(loader.rocks_trees) do |
113 | local entries = tree.manifest.repository[pkg] | 113 | local entries = tree.manifest.repository[pkg] |
114 | if entries then | 114 | if entries then |
115 | for version, pkgs in util.sortedpairs(entries, vers.compare_versions) do | 115 | for ver, pkgs in util.sortedpairs(entries, vers.compare_versions) do |
116 | if (not constraints) or vers.match_constraints(vers.parse_version(version), constraints) then | 116 | if (not constraints) or vers.match_constraints(vers.parse_version(ver), constraints) then |
117 | loader.add_context(pkg, version) | 117 | loader.add_context(pkg, version) |
118 | end | 118 | end |
119 | end | 119 | end |
@@ -145,7 +145,7 @@ end | |||
145 | -- @return table or (nil, string): The module table as returned by some other loader, | 145 | -- @return table or (nil, string): The module table as returned by some other loader, |
146 | -- or nil followed by an error message if no other loader managed to load the module. | 146 | -- or nil followed by an error message if no other loader managed to load the module. |
147 | local function call_other_loaders(module, name, version, module_name) | 147 | local function call_other_loaders(module, name, version, module_name) |
148 | for i, a_loader in ipairs(loaders) do | 148 | for _, a_loader in ipairs(loaders) do |
149 | if a_loader ~= loader.luarocks_loader then | 149 | if a_loader ~= loader.luarocks_loader then |
150 | local results = { a_loader(module_name) } | 150 | local results = { a_loader(module_name) } |
151 | if type(results[1]) == "function" then | 151 | if type(results[1]) == "function" then |