File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ function mlua.run(rockspec, no_install)
35
35
return nil , " Lua version " .. lua_version .. " is not supported"
36
36
end
37
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
+
38
43
local cmd = {" cargo build --release" }
39
44
40
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."
62
67
end
63
68
You can’t perform that action at this time.
0 commit comments