Fix 'haxelib path lib:version' if version is equal to set, and multiple installs have the same version (like 1,0,0 and git and hg)
This commit is contained in:
@@ -1079,6 +1079,10 @@ class Main {
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
var current = try getCurrent(dir) catch(e:Dynamic) null;
|
||||
if ( current != null && matchVersion(version, current) ) {
|
||||
return dir+"/"+Data.safe(current);
|
||||
}
|
||||
var matches = [];
|
||||
for( v in FileSystem.readDirectory(dir) ) {
|
||||
if( v == version ) return dir+"/"+v;
|
||||
@@ -1098,7 +1102,7 @@ class Main {
|
||||
}
|
||||
var best:Dynamic = null;
|
||||
for( match in matches ) {
|
||||
if (best == null || match.ver > best.ver) {
|
||||
if (best == null || match.ver > best.ver || (match.ver == best.ver && match.dir.indexOf (",") == -1)) {
|
||||
best = match;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user