From 9aa206dfd1d8f41ffea23879c069056e3310d6b6 Mon Sep 17 00:00:00 2001 From: Andy Li Date: Sun, 7 Dec 2014 16:47:34 +0800 Subject: [PATCH] Fixed `haxelib path ...` parsing. Currently `haxelib path hxcpp` gives: path/to/hxcpp/ -D hxcpp=3.1.0 Notice there is version number at the end. --- tools/hxcpp/PathManager.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hxcpp/PathManager.hx b/tools/hxcpp/PathManager.hx index f42393da6..dcf3bb217 100644 --- a/tools/hxcpp/PathManager.hx +++ b/tools/hxcpp/PathManager.hx @@ -106,7 +106,7 @@ class PathManager try { - output = ProcessManager.runProcess(Sys.getEnv ("HAXEPATH"), "haxelib", [ "path", name ], true, false); + output = ProcessManager.runProcess(Sys.getEnv ("HAXEPATH"), "haxelib", [ "path", name ], true, false); } catch (e:Dynamic) {} @@ -117,7 +117,7 @@ class PathManager for (i in 1...lines.length) { - if (StringTools.trim(lines[i]) == "-D " + haxelib) + if (StringTools.startsWith(StringTools.trim(lines[i]), "-D " + haxelib)) { result = StringTools.trim(lines[i - 1]); }