瀏覽代碼

[ci][php] check for mbstring extension even if php is already installed

Aleksandr Kuzmenko 5 年之前
父節點
當前提交
51c3c4dd82
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      tests/runci/targets/Php.hx

+ 8 - 0
tests/runci/targets/Php.hx

@@ -17,6 +17,14 @@ class Php {
 			null;
 
 		if (phpCmd.exitCode == 0 && phpVer != null && phpVer >= 7.0) {
+			switch systemName {
+				case "Linux":
+					var phpInfo = commandResult("php", ["-i"]);
+					if(phpInfo.stdout.indexOf("mbstring => enabled") < 0) {
+						Linux.requireAptPackages(["php-mbstring"]);
+					}
+				case _:
+			}
 			infoMsg('php ${phpVer} has already been installed.');
 			return;
 		}