Browse Source

bugfix + added cp ../..

Nicolas Cannasse 15 years ago
parent
commit
b8c5191a6d
3 changed files with 10 additions and 6 deletions
  1. 5 3
      std/tools/haxelib/Main.hx
  2. 2 1
      std/tools/haxelib/haxelib.hxml
  3. 3 2
      std/tools/haxelib/haxelib.hxp

+ 5 - 3
std/tools/haxelib/Main.hx

@@ -332,9 +332,11 @@ class Main {
 		}
 
 		// check if this version already exists
-		for( v in site.infos(infos.project).versions )
-			if( v.name == infos.version && ask("You're about to overwrite existing version '"+v.name+"', please confirm") == No )
-				throw "Aborted";
+		var sinfos = try site.infos(infos.project) catch( _ : Dynamic ) null;
+		if( sinfos != null )
+			for( v in sinfos.versions )
+				if( v.name == infos.version && ask("You're about to overwrite existing version '"+v.name+"', please confirm") == No )
+					throw "Aborted";
 
 		// query a submit id that will identify the file
 		var id = site.getSubmitId();

+ 2 - 1
std/tools/haxelib/haxelib.hxml

@@ -1,10 +1,11 @@
 # Site
 -neko index.n
 -main tools.haxelib.Site
-
+-cp ../..
 
 --next
 # Command
 -neko haxelib.n
 -main tools.haxelib.Main
+-cp ../..
 -cmd nekotools boot haxelib.n

+ 3 - 2
std/tools/haxelib/haxelib.hxp

@@ -1,6 +1,7 @@
 <haxe selected="1">
-  <output name="Site" mode="neko" out="index.n" class="tools.haxelib.Site" lib="" cmd="" main="True" debug="False"></output>
-  <output name="Command" mode="neko" out="haxelib.n" class="tools.haxelib.Main" lib="" cmd="" main="True" debug="False">-cmd nekotools boot haxelib.n</output>
+  <output name="Site" mode="neko" out="index.n" class="tools.haxelib.Site" lib="" cmd="" main="True" debug="False">-cp ../..</output>
+  <output name="Command" mode="neko" out="haxelib.n" class="tools.haxelib.Main" lib="" cmd="" main="True" debug="False">-cp ../..
+-cmd nekotools boot haxelib.n</output>
   <files path="/">
     <file path="Datas.hx" />
     <file path="haxelib.css" />