aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2011-05-11 16:38:05 -0300
committerHisham Muhammad <hisham@gobolinux.org>2011-05-11 16:38:05 -0300
commit5a7a71236d9119befa1935c94ca8bb80b862626c (patch)
tree3e5d5cb21fb514f735b6d9eab3a8cac9b468c4cd /src
parent08a85d26d8b481477f188886e1593b80dacb6eb5 (diff)
downloadluarocks-5a7a71236d9119befa1935c94ca8bb80b862626c.tar.gz
luarocks-5a7a71236d9119befa1935c94ca8bb80b862626c.tar.bz2
luarocks-5a7a71236d9119befa1935c94ca8bb80b862626c.zip
Be more explicit in the "missing external dependency" error message.
The previous message misled users into setting environment variables, so hopefully adding an example will clear things up.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/deps.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index 4f16c2a6..31018216 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -518,6 +518,7 @@ function check_external_deps(rockspec, mode)
518 for name, files in pairs(rockspec.external_dependencies) do 518 for name, files in pairs(rockspec.external_dependencies) do
519 local ok = true 519 local ok = true
520 local failed_file = nil 520 local failed_file = nil
521 local failed_dirname = nil
521 for _, extdir in ipairs(cfg.external_deps_dirs) do 522 for _, extdir in ipairs(cfg.external_deps_dirs) do
522 ok = true 523 ok = true
523 local prefix = vars[name.."_DIR"] 524 local prefix = vars[name.."_DIR"]
@@ -566,6 +567,7 @@ function check_external_deps(rockspec, mode)
566 end 567 end
567 if not found then 568 if not found then
568 ok = false 569 ok = false
570 failed_dirname = dirname
569 break 571 break
570 end 572 end
571 end 573 end
@@ -579,7 +581,7 @@ function check_external_deps(rockspec, mode)
579 end 581 end
580 end 582 end
581 if not ok then 583 if not ok then
582 return nil, "Could not find expected file "..failed_file.." for "..name.." -- you may have to install "..name.." in your system and/or set the "..name.."_DIR variable", "dependency" 584 return nil, "Could not find expected file "..failed_file.." for "..name.." -- you may have to install "..name.." in your system and/or pass "..name.."_DIR or "..name.."_"..failed_dirname.." to the luarocks command. Example: luarocks install "..rockspec.name.." "..name.."_DIR=/usr/local", "dependency"
583 end 585 end
584 end 586 end
585 end 587 end