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)
3535 return nil , " Lua version " .. lua_version .. " is not supported"
3636 end
3737
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+
3843 local cmd = {" cargo build --release" }
3944
4045 local target_path = rockspec .build and rockspec .build .target_path or " target"
@@ -57,7 +62,7 @@ function mlua.run(rockspec, no_install)
5762 table.insert (cmd , " --features" )
5863 table.insert (cmd , table.concat (features , " ," ))
5964
60- if not fs .execute ( table.concat (cmd , " " )) then
65+ if not fs .execute_env ( envs , table.concat (cmd , " " )) then
6166 return nil , " Failed building."
6267 end
6368
You can’t perform that action at this time.
0 commit comments