From f54728bef1d4d829845ecad8d802d46b9df519c0 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 14 Mar 2019 17:10:17 -0300 Subject: cmd: be more lenient when --lua-version can't find an interpreter This will still allow things like `luarocks list` and `luarocks search` to work. --- src/luarocks/cmd.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua index d7201084..ff6abf3d 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua @@ -405,7 +405,14 @@ function cmd.run_command(description, commands, external_namespace, ...) end end if not lua_data then - die("Could not find a Lua interpreter for version " .. flags["lua-version"] .. " in your PATH") + util.warning("Could not find a Lua interpreter for version " .. + flags["lua-version"] .. " in your PATH. " .. + "Modules may not install with the correct configurations. " .. + "You may want to specify to the path prefix to your build " .. + "of Lua " .. flags["lua-version"] .. " using --lua-dir") + lua_data = { + lua_version = flags["lua-version"], + } end elseif project_dir then lua_data = find_lua_version_at(project_dir) -- cgit v1.2.3-55-g6feb