diff --git a/src/haxelib/client/Main.hx b/src/haxelib/client/Main.hx index 02bf118c0..2dda2abd4 100644 --- a/src/haxelib/client/Main.hx +++ b/src/haxelib/client/Main.hx @@ -1291,7 +1291,7 @@ class Main { print("Library "+prj+" current version is now "+version); } - function checkRec( rep : String, prj : String, version : String, l : List<{ project : String, version : String, dir : String, info : Infos }> ) { + function checkRec( rep : String, prj : String, version : String, l : List<{ project : String, version : String, dir : String, info : Infos }>, ?returnDependencies : Bool = true ) { var pdir = rep + Data.safe(prj); if( !FileSystem.exists(pdir) ) throw "Library "+prj+" is not installed : run 'haxelib install "+prj+"'"; @@ -1312,9 +1312,11 @@ class Main { var json = try File.getContent(vdir+"/"+Data.JSON) catch( e : Dynamic ) null; var inf = Data.readData(json,false); l.add({ project : prj, version : version, dir : Path.addTrailingSlash(vdir), info: inf }); - for( d in inf.dependencies ) - if( !Lambda.exists(l, function(e) return e.project == d.name) ) - checkRec(rep,d.name,if( d.version == "" ) null else d.version,l); + if( returnDependencies ) { + for( d in inf.dependencies ) + if( !Lambda.exists(l, function(e) return e.project == d.name) ) + checkRec(rep,d.name,if( d.version == "" ) null else d.version,l); + } } function path() { @@ -1322,7 +1324,7 @@ class Main { var list = new List(); while( argcur < args.length ) { var a = args[argcur++].split(":"); - checkRec(rep, a[0],a[1],list); + checkRec(rep, a[0], a[1], list); } for( d in list ) { var ndir = d.dir + "ndll"; @@ -1350,7 +1352,7 @@ class Main { while( argcur < args.length ) { var a = args[argcur++].split(":"); var results = new List(); - checkRec(rep, a[0],a[1],results); + checkRec(rep, a[0], a[1], results, false); if( !results.isEmpty() ) Sys.println(results.first().dir); } }