Explorar el Código

[lua] use stable versions for lua libs if possible

Justin Donaldson hace 5 años
padre
commit
c5bbc98115
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  1. 7 3
      tests/runci/targets/Lua.hx

+ 7 - 3
tests/runci/targets/Lua.hx

@@ -29,10 +29,14 @@ class Lua {
 		}
 	}
 
-	static function installLib(lib : String, version : String, server = "https://luarocks.org/dev"){
-		var server_arg = '--server=$server';
+	static function installLib(lib : String, version : String, ?server :String){
 		if (!commandSucceed("luarocks", ["show", lib, version])) {
-			runCommand("luarocks", ["install",lib, version, server_arg]);
+            var args = ["install", lib, version];
+            if (server != null){
+                var server_arg = '--server=$server';
+                args.push(server_arg);
+            }
+			runCommand("luarocks", args);
 		} else {
 			infoMsg('Lua dependency $lib is already installed at version $version');
 		}