Restore previous reliance on 'haxelib path'

This commit is contained in:
Joshua Granick
2017-05-18 13:55:15 -07:00
parent f4d1df57ee
commit d7397f21ae
2 changed files with 119 additions and 58 deletions

View File

@@ -652,16 +652,21 @@ class Main {
if( inf.versions.length == 0 )
throw "The library "+inf.name+" has not yet released a version";
var version = if( reqversion != null ) reqversion else inf.getLatest();
var found = false;
var matches = [];
var best = null;
for( v in inf.versions )
if( v.name == version ) {
found = true;
break;
if( matchVersion(version,v.name) ) {
matches.push(v.name);
}
if( !found )
for( match in matches ) {
if (best == null || match > best) {
best = match;
}
}
if( best == null )
throw "No such version "+version+" for library "+inf.name;
return version;
return best;
}
function installFromHxml( rep:String, path:String ) {