diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/cmd/config.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/luarocks/cmd/config.lua b/src/luarocks/cmd/config.lua index 577da1ad..2a49c1db 100644 --- a/src/luarocks/cmd/config.lua +++ b/src/luarocks/cmd/config.lua | |||
| @@ -58,11 +58,19 @@ local cfg_arrays = { | |||
| 58 | rocks_servers = true, | 58 | rocks_servers = true, |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | local cfg_skip = { | ||
| 62 | errorcodes = true, | ||
| 63 | flags = true, | ||
| 64 | platforms = true, | ||
| 65 | root_dir = true, | ||
| 66 | upload_servers = true, | ||
| 67 | } | ||
| 68 | |||
| 61 | local function print_config(cfg) | 69 | local function print_config(cfg) |
| 62 | for k, v in util.sortedpairs(cfg) do | 70 | for k, v in util.sortedpairs(cfg) do |
| 63 | if type(v) == "string" or type(v) == "boolean" or type(v) == "number" then | 71 | if type(v) == "string" or type(v) == "boolean" or type(v) == "number" then |
| 64 | printf("%s = %q", k, v) | 72 | printf("%s = %q", k, v) |
| 65 | elseif type(v) == "function" then | 73 | elseif type(v) == "function" or cfg_skip[k] then |
| 66 | -- skip | 74 | -- skip |
| 67 | elseif cfg_maps[k] then | 75 | elseif cfg_maps[k] then |
| 68 | printf("%s = {", k) | 76 | printf("%s = {", k) |
