@@ -30,6 +30,20 @@ const processCwd = () => {
3030 return process . cwd ( ) . split ( p . sep ) . join ( p . posix . sep ) ;
3131}
3232
33+ async function finish_luajit_install ( src , dst , luajit ) {
34+ if ( isWindows ( ) ) {
35+ await fsp . copyFile ( path . join ( src , "lua51.dll" ) , path . join ( dst , "bin" , "lua51.dll" ) )
36+
37+ await exec . exec ( `ln -s ${ luajit } lua.exe` , undefined , {
38+ cwd : path . join ( dst , "bin" )
39+ } )
40+ } else {
41+ await exec . exec ( `ln -s ${ luajit } lua` , undefined , {
42+ cwd : path . join ( dst , "bin" )
43+ } )
44+ }
45+ }
46+
3347async function install_luajit_openresty ( luaInstallPath ) {
3448 const buildPath = path . join ( process . env [ "RUNNER_TEMP" ] , BUILD_PREFIX )
3549 const luaCompileFlags = core . getInput ( 'luaCompileFlags' )
@@ -58,9 +72,7 @@ async function install_luajit_openresty(luaInstallPath) {
5872 cwd : path . join ( buildPath , "luajit2" )
5973 } )
6074
61- await exec . exec ( "ln -s luajit lua" , undefined , {
62- cwd : path . join ( luaInstallPath , "bin" )
63- } )
75+ await finish_luajit_install ( path . join ( installPath , "luajit2" , "src" ) , luaInstallPath , "luajit-2.1.0-beta3" )
6476}
6577
6678async function install_luajit ( luaInstallPath , luajitVersion ) {
@@ -90,9 +102,7 @@ async function install_luajit(luaInstallPath, luajitVersion) {
90102 cwd : luaExtractPath
91103 } )
92104
93- await exec . exec ( `ln -s luajit-${ luajitVersion } lua` , undefined , {
94- cwd : path . join ( luaInstallPath , "bin" )
95- } )
105+ await finish_luajit_install ( path . join ( luaExtractPath , "src" ) , luaInstallPath , `luajit-${ luajitVersion } ` )
96106}
97107
98108async function install_plain_lua ( luaInstallPath , luaVersion ) {
0 commit comments