diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-21 01:11:58 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-21 01:11:58 -0200 |
commit | 6b398ff0e90dd6329a2431fb8270627903f6bb35 (patch) | |
tree | f148d1bb65ff17f96766ddaf72d542973ec54401 | |
parent | 13a249a6c1dc7e43bbe29791d2ad2bb2b42850d6 (diff) | |
download | luarocks-6b398ff0e90dd6329a2431fb8270627903f6bb35.tar.gz luarocks-6b398ff0e90dd6329a2431fb8270627903f6bb35.tar.bz2 luarocks-6b398ff0e90dd6329a2431fb8270627903f6bb35.zip |
Fix display of error message in loader.
-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 aa3b2781..d828a359 100644 --- a/src/luarocks/loader.lua +++ b/src/luarocks/loader.lua | |||
@@ -6,8 +6,8 @@ | |||
6 | -- used to load previous modules, so that the loader chooses versions | 6 | -- used to load previous modules, so that the loader chooses versions |
7 | -- that are declared to be compatible with the ones loaded earlier. | 7 | -- that are declared to be compatible with the ones loaded earlier. |
8 | local global_env = _G | 8 | local global_env = _G |
9 | local package, require, ipairs, pairs, table, type, next, unpack = | 9 | local package, require, ipairs, pairs, table, type, next, unpack, tostring, error = |
10 | package, require, ipairs, pairs, table, type, next, unpack | 10 | package, require, ipairs, pairs, table, type, next, unpack, tostring, error |
11 | 11 | ||
12 | module("luarocks.loader") | 12 | module("luarocks.loader") |
13 | 13 | ||
@@ -146,7 +146,7 @@ local function select_module(module, filter_module_name) | |||
146 | local name, version = entry:match("^([^/]*)/(.*)$") | 146 | local name, version = entry:match("^([^/]*)/(.*)$") |
147 | local module_name = tree.manifest.repository[name][version][1].modules[module] | 147 | local module_name = tree.manifest.repository[name][version][1].modules[module] |
148 | if type(module_name) ~= "string" then | 148 | if type(module_name) ~= "string" then |
149 | error("Invalid format in manifest file (invalid data for "..tostring(name).." "..tostring(version)..")") | 149 | error("Invalid data in manifest file for module "..tostring(module).." (invalid data for "..tostring(name).." "..tostring(version)..")") |
150 | end | 150 | end |
151 | module_name = filter_module_name(module_name, name, version, tree.tree, i) | 151 | module_name = filter_module_name(module_name, name, version, tree.tree, i) |
152 | if context[name] == version then | 152 | if context[name] == version then |