diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/loader.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/luarocks/loader.lua b/src/luarocks/loader.lua index 22a5a8df..3d421632 100644 --- a/src/luarocks/loader.lua +++ b/src/luarocks/loader.lua | |||
| @@ -56,9 +56,12 @@ function add_context(name, version) | |||
| 56 | for _, tree in pairs(rocks_trees) do | 56 | for _, tree in pairs(rocks_trees) do |
| 57 | local manifest = tree.manifest | 57 | local manifest = tree.manifest |
| 58 | 58 | ||
| 59 | local pkgdeps = manifest.dependencies and manifest.dependencies[name][version] | 59 | local pkgdeps |
| 60 | if manifest.dependencies and manifest.dependencies[name] then | ||
| 61 | pkgdeps = manifest.dependencies[name][version] | ||
| 62 | end | ||
| 60 | if not pkgdeps then | 63 | if not pkgdeps then |
| 61 | return | 64 | return nil |
| 62 | end | 65 | end |
| 63 | for _, dep in ipairs(pkgdeps) do | 66 | for _, dep in ipairs(pkgdeps) do |
| 64 | local package, constraints = dep.name, dep.constraints | 67 | local package, constraints = dep.name, dep.constraints |
