瀏覽代碼

[ci][hl] use system's hl command as a fallback

Aleksandr Kuzmenko 3 年之前
父節點
當前提交
bfd518af37
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      tests/runci/targets/Hl.hx

+ 9 - 0
tests/runci/targets/Hl.hx

@@ -3,6 +3,7 @@ package runci.targets;
 import haxe.io.Path;
 import haxe.io.Path;
 import sys.FileSystem;
 import sys.FileSystem;
 import runci.System.*;
 import runci.System.*;
+import runci.System.Failure;
 import runci.Config.*;
 import runci.Config.*;
 
 
 class Hl {
 class Hl {
@@ -74,6 +75,14 @@ class Hl {
 
 
 	static public function run(args:Array<String>) {
 	static public function run(args:Array<String>) {
 		getHlDependencies();
 		getHlDependencies();
+
+		var hlBinary = try {
+			runCommand(hlBinary);
+			hlBinary;
+		} catch(e:Failure) {
+			'hl';
+		}
+
 		runCommand("haxe", ["compile-hl.hxml"].concat(args));
 		runCommand("haxe", ["compile-hl.hxml"].concat(args));
 		runCommand(hlBinary, ["bin/unit.hl"]);
 		runCommand(hlBinary, ["bin/unit.hl"]);