Browse Source

fix : use $HOME

Nicolas Cannasse 19 years ago
parent
commit
0a9fbfd33b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      std/tools/haxelib/Main.hx

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

@@ -334,8 +334,9 @@ class Main {
 			safeDir(rep);
 			return rep+"\\";
 		}
+		var config = neko.Sys.getEnv("HOME")+"/.haxelib";
 		var rep = try
-			neko.io.File.getContent("~/.haxelib")
+			neko.io.File.getContent(config)
 		catch( e : Dynamic ) try
 			neko.io.File.getContent("/etc/.haxelib")
 		catch( e : Dynamic )
@@ -351,7 +352,7 @@ class Main {
 				rep = line;
 			if( !neko.FileSystem.exists(rep) )
 				neko.FileSystem.createDirectory(rep);
-			var f = neko.io.File.write("~/.haxelib",true);
+			var f = neko.io.File.write(config,true);
 			f.write(rep);
 			f.close();
 		}