diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-05-17 23:16:04 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-08-25 15:08:05 -0300 |
commit | c94e0f200099233b1e46866bd00eb3387649cd35 (patch) | |
tree | faa2a22ec8c7557d78e2b3e1fc5c7ca569312546 | |
parent | ecb63347bf7d44c68210befc9d03c013350c7831 (diff) | |
download | luarocks-c94e0f200099233b1e46866bd00eb3387649cd35.tar.gz luarocks-c94e0f200099233b1e46866bd00eb3387649cd35.tar.bz2 luarocks-c94e0f200099233b1e46866bd00eb3387649cd35.zip |
avoid crash if variables.LUA* are unset
Fixes #1418
-rw-r--r-- | src/luarocks/cmd.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua index 3abad789..f1446df4 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua | |||
@@ -350,9 +350,9 @@ local function get_config_text(cfg) -- luacheck: ignore 431 | |||
350 | 350 | ||
351 | local libdir_ok = deps.check_lua_libdir(cfg.variables) | 351 | local libdir_ok = deps.check_lua_libdir(cfg.variables) |
352 | local incdir_ok = deps.check_lua_incdir(cfg.variables) | 352 | local incdir_ok = deps.check_lua_incdir(cfg.variables) |
353 | local bindir_ok = fs.exists(cfg.variables.LUA_BINDIR) | 353 | local bindir_ok = cfg.variables.LUA_BINDIR and fs.exists(cfg.variables.LUA_BINDIR) |
354 | local luadir_ok = fs.exists(cfg.variables.LUA_DIR) | 354 | local luadir_ok = cfg.variables.LUA_DIR and fs.exists(cfg.variables.LUA_DIR) |
355 | local lua_ok = fs.exists(cfg.variables.LUA) | 355 | local lua_ok = cfg.variables.LUA and fs.exists(cfg.variables.LUA) |
356 | 356 | ||
357 | local buf = "Configuration:\n" | 357 | local buf = "Configuration:\n" |
358 | buf = buf.." Lua:\n" | 358 | buf = buf.." Lua:\n" |