From 88ce8218b21505f7559cb1e58cc2560b5ee802e2 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 27 Apr 2010 21:46:29 +0100 Subject: [PATCH] check whether git is installed --- src/SparklePony.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/SparklePony.cs b/src/SparklePony.cs index fed0ebb9..29313f33 100644 --- a/src/SparklePony.cs +++ b/src/SparklePony.cs @@ -42,6 +42,17 @@ public class SparklePony { public static void Main (string [] args) { + // Check if git is installed + Process Process = new Process(); + Process.StartInfo.RedirectStandardOutput = true; + Process.StartInfo.UseShellExecute = false; + Process.StartInfo.FileName = "git"; + Process.Start(); + if (Process.StandardOutput.ReadToEnd().IndexOf ("version") > -1) { + Console.WriteLine ("Git wasn't found.\nYou can get it from http://git-scm.com/."); + Environment.Exit (0); + } + bool HideUI = false; if (args.Length > 0) { foreach (string Argument in args) {