From 5a7a71236d9119befa1935c94ca8bb80b862626c Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 11 May 2011 16:38:05 -0300 Subject: 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. --- src/luarocks/deps.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) for name, files in pairs(rockspec.external_dependencies) do local ok = true local failed_file = nil + local failed_dirname = nil for _, extdir in ipairs(cfg.external_deps_dirs) do ok = true local prefix = vars[name.."_DIR"] @@ -566,6 +567,7 @@ function check_external_deps(rockspec, mode) end if not found then ok = false + failed_dirname = dirname break end end @@ -579,7 +581,7 @@ function check_external_deps(rockspec, mode) end end if not ok then - 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" + 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" end end end -- cgit v1.2.3-55-g6feb