Explorar el Código

[TravisCI] try to apt-get only if there is package missing

Andy Li hace 10 años
padre
commit
1a53b0a813
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      tests/RunCi.hx

+ 2 - 1
tests/RunCi.hx

@@ -95,7 +95,8 @@ class RunCi {
 
 	static function requireAptPackages(packages:Array<String>):Void {
 		var notYetInstalled = [for (p in packages) if (!isAptPackageInstalled(p)) p];
-		runCommand("sudo", ["apt-get", "install", "-y"].concat(notYetInstalled), true);
+		if (notYetInstalled.length > 0)
+			runCommand("sudo", ["apt-get", "install", "-y"].concat(notYetInstalled), true);
 	}
 
 	static function haxelibInstallGit(account:String, repository:String, ?branch:String, ?srcPath:String, useRetry:Bool = false, ?altName:String):Void {