Skip to content

Commit

Permalink
Better haxelib path ... parsing. As suggested by Hugh in HaxeFounda…
Browse files Browse the repository at this point in the history
  • Loading branch information
andyli committed Dec 8, 2014
1 parent 3e327b9 commit 3762659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/hxcpp/PathManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ class PathManager

var lines = output.split("\n");
var result = "";

var re = new EReg("^-D " + haxelib + "(=.*)?$", ""); //matches "-D hxcpp=3.1.0" or "-D hxcpp", but not "-D hxcpp-extras"
for (i in 1...lines.length)
{
if (StringTools.startsWith(StringTools.trim(lines[i]), "-D " + haxelib))
if (re.match(StringTools.trim(lines[i])))
{
result = StringTools.trim(lines[i - 1]);
}
Expand Down

0 comments on commit 3762659

Please sign in to comment.