Skip to content

Commit cf32cb2

Browse files
authored
Fix haxelib path fallback functionality on windows (#1241)
The check on line 134 would never work properly on windows, because the line had a CR character so FileSystem.exists returned false. This meant that if a library was resolved via a name that doesn't exactly match the `-D` flag set by haxelib, e.g. Hxcpp instead of hxcpp or via an alias, then it would be reported as missing.
1 parent acef6fa commit cf32cb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/hxcpp/PathManager.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ class PathManager
111111
catch (e:Dynamic) {}
112112

113113
Log.verbose = cache;
114-
115-
var lines = output.split("\n");
114+
115+
var lines = ~/\r?\n/g.split(output);
116116
var result = "";
117117
var re = new EReg("^-D " + haxelib + "(=.*)?$", ""); //matches "-D hxcpp=3.1.0" or "-D hxcpp", but not "-D hxcpp-extras"
118118
for (i in 1...lines.length)

0 commit comments

Comments
 (0)