From c08fbcbf917e5cd7777b772f4ce0ee56b728355d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Lemi=C3=A8re?= Date: Thu, 10 Mar 2016 17:30:26 +0100 Subject: [PATCH] Don't install version-less dependencies that have a dev set Fix #174 --- src/haxelib/client/Main.hx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/haxelib/client/Main.hx b/src/haxelib/client/Main.hx index 5dc7651fb..a70ca2877 100644 --- a/src/haxelib/client/Main.hx +++ b/src/haxelib/client/Main.hx @@ -800,7 +800,18 @@ class Main { function doInstallDependencies( dependencies:Array ) { + var rep = getRepository(); + for( d in dependencies ) { + if( d.version == "" ) { + var pdir = rep + Data.safe(d.name); + var dev = try getDev(pdir) catch (_:Dynamic) null; + + if (dev != null) { // no version specified and dev set, no need to install dependency + continue; + } + } + print("Installing dependency "+d.name+" "+d.version); if( d.version == "" ) d.version = site.infos(d.name).getLatest();