diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in index b093fd907dddcfaf8ae820a1cc313ef29ce8ba5b..2e1985092e5c2691e5f1f6f508c40b3e40b6bd8b 100755 --- a/extra/dist/tarantoolctl.in +++ b/extra/dist/tarantoolctl.in @@ -958,7 +958,7 @@ local function rocks() config = "luarocks.cmd.config", doc = "luarocks.cmd.doc", download = "luarocks.cmd.download", - help = "luarocks.cmd.help", + help = pcall(require, "luarocks.cmd.help") and "luarocks.cmd.help" or nil, init = "luarocks.cmd.init", install = "luarocks.cmd.install", lint = "luarocks.cmd.lint", diff --git a/test/app-tap/tarantoolctl.test.lua b/test/app-tap/tarantoolctl.test.lua index c2c41cb7c2fda17c39a1946f7759ff9158e77545..ff2f80db723248d38cff732fffdaa1ad610d763b 100755 --- a/test/app-tap/tarantoolctl.test.lua +++ b/test/app-tap/tarantoolctl.test.lua @@ -176,7 +176,7 @@ local function merge(...) end local test = tap.test('tarantoolctl') -test:plan(8) +test:plan(9) -- basic start/stop test -- must be stopped afterwards @@ -353,6 +353,18 @@ do test_help(test_i, dir, "tarantoolctl", "Usage:") check_ok(test_i, dir, "rocks", "--help", 0, "Usage:") end) + test:test("check no luarocks warnings issues", function(test_i) + test_i:plan(1) + local _, _, stderr = tctl_command(dir, "rocks", "--version") + local warnings = 0 + for _, line in pairs(string.split(stderr, '\n')) do + if line:match('[Ww]arning:') then + warnings = warnings + 1 + end + end + + test_i:is(warnings, 0, 'no warnings issued') + end) end) recursive_rmdir(dir)