aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cfg.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 704c7daf..f5d7fb5e 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -257,6 +257,12 @@ do
257 local lst = {} -- use temp array to not confuse `pairs` in loop 257 local lst = {} -- use temp array to not confuse `pairs` in loop
258 for plat in pairs(cfg.platforms) do 258 for plat in pairs(cfg.platforms) do
259 if cfg.platforms[plat] then -- entries set to 'false' skipped 259 if cfg.platforms[plat] then -- entries set to 'false' skipped
260 if not platform_order[plat] then
261 local pl = ""
262 for k,_ in pairs(platform_order) do pl = pl .. ", " .. k end
263 io.stderr:write("Bad platform given; "..tostring(plat)..". Valid entries are: "..pl:sub(3,-1) ..".\n")
264 os.exit(cfg.errorcodes.CONFIGFILE)
265 end
260 table.insert(lst, plat) 266 table.insert(lst, plat)
261 else 267 else
262 cfg.platforms[plat] = nil 268 cfg.platforms[plat] = nil