diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-24 22:47:04 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 15:51:36 -0300 |
commit | 8a49bb4fceaa2532bcaaa94f0282a4a2dc7f1b40 (patch) | |
tree | f06d48f7919a23b22ba2cf958b3324a12bfc5bc2 /src | |
parent | c9708d8eabf178f2fdea371a024045355ff00505 (diff) | |
download | luarocks-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.lua | 4 |
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 = { | |||
69 | local function print_config(cfg) | 69 | local 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 |