Browse Source

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

Aleksandr Kuzmenko 5 years ago
parent
commit
51c3c4dd82
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tests/runci/targets/Php.hx

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

@@ -17,6 +17,14 @@ class Php {
 			null;
 			null;
 
 
 		if (phpCmd.exitCode == 0 && phpVer != null && phpVer >= 7.0) {
 		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.');
 			infoMsg('php ${phpVer} has already been installed.');
 			return;
 			return;
 		}
 		}