Fix version mismatch, fix null check

This commit is contained in:
Joshua Granick
2017-05-22 09:23:33 -07:00
parent f4f38c0462
commit 43c0deddb7
3 changed files with 14 additions and 2 deletions

View File

@@ -1116,7 +1116,7 @@ class HXProject {
var name = haxelib.name;
var version = HaxelibHelper.getVersion (haxelib);
if (haxelib.version != null) {
if (version != null) {
name += ":" + version;

View File

@@ -242,6 +242,18 @@ class HaxelibHelper {
LogHelper.error ("Could not find haxelib \"" + dependencyName + "\" (dependency of \"" + haxelib.name + "\"), does it need to be installed?");
} else if (output.indexOf ("is not installed") > -1) {
var start = output.indexOf ("Library " + 8);
var end = output.indexOf (" ", start);
var dependencyName = output.substring (start, end);
start = output.indexOf ("version ") + 8;
end = output.indexOf (" ", start);
var version = output.substring (start, end);
LogHelper.error ("Could not find haxelib \"" + dependencyName + "\" version \"" + version + "\", does it need to be installed?");
} else {
if (haxelib.version != "") {

View File

@@ -1290,7 +1290,7 @@ class Main {
var dev = try getDev(pdir) catch (_:Dynamic) null;
var vdir = try getVersionDir(version,dev,pdir) catch (_:Dynamic) null;
if( vdir != null && !FileSystem.exists(vdir) )
if( vdir == null || !FileSystem.exists(vdir) )
throw "Library "+prj+" version "+version+" is not installed";
for( p in l )