aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-06-24 22:47:04 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-07-01 15:51:36 -0300
commit8a49bb4fceaa2532bcaaa94f0282a4a2dc7f1b40 (patch)
treef06d48f7919a23b22ba2cf958b3324a12bfc5bc2 /src
parentc9708d8eabf178f2fdea371a024045355ff00505 (diff)
downloadluarocks-8a49bb4fceaa2532bcaaa94f0282a4a2dc7f1b40.tar.gz
luarocks-8a49bb4fceaa2532bcaaa94f0282a4a2dc7f1b40.tar.bz2
luarocks-8a49bb4fceaa2532bcaaa94f0282a4a2dc7f1b40.zip
config: Lua 5.1/5.2 compatibility fix
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cmd/config.lua4
1 files changed, 3 insertions, 1 deletions
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 = {
69local function print_config(cfg) 69local function print_config(cfg)
70 for k, v in util.sortedpairs(cfg) do 70 for k, v in util.sortedpairs(cfg) do
71 k = tostring(k) 71 k = tostring(k)
72 if type(v) == "string" or type(v) == "boolean" or type(v) == "number" then 72 if type(v) == "string" or type(v) == "number" then
73 printf("%s = %q", k, v) 73 printf("%s = %q", k, v)
74 elseif type(v) == "boolean" then
75 printf("%s = %s", k, tostring(v))
74 elseif type(v) == "function" or cfg_skip[k] then 76 elseif type(v) == "function" or cfg_skip[k] then
75 -- skip 77 -- skip
76 elseif cfg_maps[k] then 78 elseif cfg_maps[k] then