Skip to content

Commit f13f4ad

Browse files
Japstyoleg-jukovec
authored andcommitted
luarocks: prefers a hardcoded interpreter
Since there is a need to use the tarantool interpreter instead of lua, a couple of changes were made to apply the FORCE_HARDCODED flag, which allows you to use tarantool as an interpreter even if there is a luarocks config.
1 parent 6ff46b8 commit f13f4ad

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/luarocks/cmd.lua

+3
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ function cmd.run_command(description, commands, external_namespace, ...)
573573
-- Now that the config is fully loaded, reinitialize fs using the full
574574
-- feature set.
575575
fs.init()
576+
if cfg.variables.FORCE_HARDCODED and cfg.variables.LUA_INTERPRETER then
577+
lua_found = true
578+
end
576579

577580
-- if the Lua interpreter wasn't explicitly found before cfg.init,
578581
-- try again now.

src/luarocks/core/cfg.lua

+4
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,10 @@ function cfg.init(detected, warning)
763763
end
764764
end
765765

766+
if hardcoded.FORCE_HARDCODED then
767+
util.deep_merge(cfg.variables, hardcoded)
768+
end
769+
766770
----------------------------------------
767771
-- Config files are loaded.
768772
-- Let's finish up the cfg table.

0 commit comments

Comments
 (0)