diff options
| author | Hisham <hisham@gobolinux.org> | 2016-11-14 14:11:42 -0200 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-11-14 14:11:49 -0200 |
| commit | b75ca805cf6c92214568b28540a931b70367a548 (patch) | |
| tree | 4a8737d0842648c61eb4306bdc424ec76b61eb50 /src | |
| parent | 39fe27721f2ed6a4093fa79dd4219d61bdf48f3f (diff) | |
| download | luarocks-b75ca805cf6c92214568b28540a931b70367a548.tar.gz luarocks-b75ca805cf6c92214568b28540a931b70367a548.tar.bz2 luarocks-b75ca805cf6c92214568b28540a931b70367a548.zip | |
Minor luacheck cleanups
Diffstat (limited to 'src')
| -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 |
