diff options
author | equa <equaa@protonmail.com> | 2020-11-27 12:40:14 -0600 |
---|---|---|
committer | equa <equaa@protonmail.com> | 2020-11-27 12:40:14 -0600 |
commit | be3b0c51059f95c40661846e7290ba47c6936c76 (patch) | |
tree | db75739fb4d7b1c0c04f8b9736ab52525c507a4f | |
parent | d2c3b57b324f06d17cd2c594e26b143dfe3a8133 (diff) | |
download | luarocks-be3b0c51059f95c40661846e7290ba47c6936c76.tar.gz luarocks-be3b0c51059f95c40661846e7290ba47c6936c76.tar.bz2 luarocks-be3b0c51059f95c40661846e7290ba47c6936c76.zip |
Add error messages to lua_h_exists
Previously, if LUA_INCDIR was specified but invalid, install and other
commands would error without a message, eventually causing a failed
assertion in cmd.lua and leaving a hard-to-troubleshoot situation
with no information.
-rw-r--r-- | src/luarocks/deps.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index 2233f74a..f6de0db8 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
@@ -665,7 +665,11 @@ local function lua_h_exists(d, luaver) | |||
665 | if data:match("LUA_VERSION_NUM%s*" .. tostring(luanum)) then | 665 | if data:match("LUA_VERSION_NUM%s*" .. tostring(luanum)) then |
666 | return d | 666 | return d |
667 | end | 667 | end |
668 | |||
669 | return nil, "Lua header mismatches configured version. You may need to install them or configure LUA_INCDIR.", "dependency" | ||
668 | end | 670 | end |
671 | |||
672 | return nil, "Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.", "dependency" | ||
669 | end | 673 | end |
670 | 674 | ||
671 | local function find_lua_incdir(prefix, luaver, luajitver) | 675 | local function find_lua_incdir(prefix, luaver, luajitver) |