aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-24 17:20:21 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-24 17:20:21 +0000
commite8fe170babc9544ccf8f2f8daa52933dddbb9b5b (patch)
tree2af12dd24c4318e883ddfcc02a026a2c36a8eb8f
parenta411a647693dbe9561f0825382d0c302a6248bb4 (diff)
downloadluarocks-e8fe170babc9544ccf8f2f8daa52933dddbb9b5b.tar.gz
luarocks-e8fe170babc9544ccf8f2f8daa52933dddbb9b5b.tar.bz2
luarocks-e8fe170babc9544ccf8f2f8daa52933dddbb9b5b.zip
work with rockspecs with no dependencies
git-svn-id: http://luarocks.org/svn/luarocks/trunk@110 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
-rw-r--r--src/luarocks/loader.lua7
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