Skip to content

Commit 6cbdcc7

Browse files
jdonaldsonRealyUniqueName
authored andcommitted
[lua] use stable versions for lua libs if possible
1 parent 0713cf1 commit 6cbdcc7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/runci/targets/Lua.hx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ class Lua {
2929
}
3030
}
3131

32-
static function installLib(lib : String, version : String, server = "https://luarocks.org/dev"){
33-
var server_arg = '--server=$server';
32+
static function installLib(lib : String, version : String, ?server :String){
3433
if (!commandSucceed("luarocks", ["show", lib, version])) {
35-
runCommand("luarocks", ["install",lib, version, server_arg]);
34+
var args = ["install", lib, version];
35+
if (server != null){
36+
var server_arg = '--server=$server';
37+
args.push(server_arg);
38+
}
39+
runCommand("luarocks", args);
3640
} else {
3741
infoMsg('Lua dependency $lib is already installed at version $version');
3842
}

0 commit comments

Comments
 (0)