We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e108bf commit f4b82c6Copy full SHA for f4b82c6
src/luarocks/build/rust-mlua.lua
@@ -35,6 +35,11 @@ function mlua.run(rockspec, no_install)
35
return nil, "Lua version " .. lua_version .. " is not supported"
36
end
37
38
+ local envs = {}
39
+ for _, key in ipairs({ "package", "version" }) do
40
+ envs[("LUA_ROCKSPEC_%s"):format(key:upper())] = fs.Q(rockspec[key])
41
+ end
42
+
43
local cmd = {"cargo build --release"}
44
45
local target_path = rockspec.build and rockspec.build.target_path or "target"
@@ -57,7 +62,7 @@ function mlua.run(rockspec, no_install)
57
62
table.insert(cmd, "--features")
58
63
table.insert(cmd, table.concat(features, ","))
59
64
60
- if not fs.execute(table.concat(cmd, " ")) then
65
+ if not fs.execute_env(envs, table.concat(cmd, " ")) then
61
66
return nil, "Failed building."
67
68
0 commit comments