Browse Source

check if git is installed (fixed issue #828)

Simon Krajewski 13 years ago
parent
commit
facbdcbf95
1 changed files with 6 additions and 0 deletions
  1. 6 0
      std/tools/haxelib/Main.hx

+ 6 - 0
std/tools/haxelib/Main.hx

@@ -750,6 +750,12 @@ class Main {
 	}
 
 	function git() {
+		try command("git", [])
+		catch (e:Dynamic)
+		{
+			print("Could not execute git, please make sure it is installed and available in your PATH.");
+			return;
+		}
 		var libName = param("Library name");
 		var rep = getRepository();
 		var libPath = rep + Datas.safe(libName) + "/git";