Browse Source

skip unexisting projects while upgrading

Nicolas Cannasse 16 years ago
parent
commit
e542b36e3a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/tools/haxelib/Main.hx

+ 2 - 2
std/tools/haxelib/Main.hx

@@ -546,11 +546,11 @@ class Main {
 		var prompt = true;
 		var update = false;
 		for( p in neko.FileSystem.readDirectory(rep) ) {
-			if( p.charAt(0) == "." )
+			if( p.charAt(0) == "." || !neko.FileSystem.isDirectory(rep+"/"+p) )
 				continue;
 			var p = Datas.unsafe(p);
 			print("Checking "+p);
-			var inf = site.infos(p);
+			var inf = try site.infos(p) catch( e : Dynamic ) { neko.Lib.println(e); continue; };
 			if( !neko.FileSystem.exists(rep+Datas.safe(p)+"/"+Datas.safe(inf.curversion)) ) {
 				if( prompt )
 					switch ask("Upgrade "+p+" to "+inf.curversion) {