From 8a49bb4fceaa2532bcaaa94f0282a4a2dc7f1b40 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 24 Jun 2018 22:47:04 -0300 Subject: config: Lua 5.1/5.2 compatibility fix --- src/luarocks/cmd/config.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/cmd/config.lua b/src/luarocks/cmd/config.lua index 12396630..cd446f44 100644 --- a/src/luarocks/cmd/config.lua +++ b/src/luarocks/cmd/config.lua @@ -69,8 +69,10 @@ local cfg_skip = { local function print_config(cfg) for k, v in util.sortedpairs(cfg) do k = tostring(k) - if type(v) == "string" or type(v) == "boolean" or type(v) == "number" then + if type(v) == "string" or type(v) == "number" then printf("%s = %q", k, v) + elseif type(v) == "boolean" then + printf("%s = %s", k, tostring(v)) elseif type(v) == "function" or cfg_skip[k] then -- skip elseif cfg_maps[k] then -- cgit v1.2.3-55-g6feb