From 1c02a4f7e8acc25607d92eedb2fc8654d1aed377 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 13 Feb 2013 22:45:12 +0000 Subject: [PATCH] windows: explicitly point GIT_SSH to ssh.exe --- SparkleLib/Git/SparkleGit.cs | 4 ++++ SparkleShare/Windows/SparkleController.cs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/SparkleLib/Git/SparkleGit.cs b/SparkleLib/Git/SparkleGit.cs index c2b14930..7c71cf28 100644 --- a/SparkleLib/Git/SparkleGit.cs +++ b/SparkleLib/Git/SparkleGit.cs @@ -103,6 +103,7 @@ namespace SparkleLib.Git { public static string ExecPath; public static string GitPath; + public static string SSHPath; public SparkleGit (string path, string args) : base (path, args) @@ -117,6 +118,9 @@ namespace SparkleLib.Git { StartInfo.WorkingDirectory = path; StartInfo.CreateNoWindow = true; + if (!string.IsNullOrEmpty (SSHPath)) + StartInfo.EnvironmentVariables.Add ("GIT_SSH", SSHPath); + if (string.IsNullOrEmpty (ExecPath)) StartInfo.Arguments = args; else diff --git a/SparkleShare/Windows/SparkleController.cs b/SparkleShare/Windows/SparkleController.cs index 60ad3e90..8dc7aca6 100644 --- a/SparkleShare/Windows/SparkleController.cs +++ b/SparkleShare/Windows/SparkleController.cs @@ -29,6 +29,7 @@ using Forms = System.Windows.Forms; using Microsoft.Win32; using SparkleLib; + namespace SparkleShare { public class SparkleController : SparkleControllerBase { @@ -56,6 +57,7 @@ namespace SparkleShare { string executable_path = Path.GetDirectoryName (Forms.Application.ExecutablePath); string msysgit_path = Path.Combine (executable_path, "msysgit"); + string new_PATH = msysgit_path + @"\bin" + ";" + msysgit_path + @"\mingw\bin" + ";" + msysgit_path + @"\cmd" + ";" + @@ -65,6 +67,8 @@ namespace SparkleShare { Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); StartSSH (); + SparkleLib.Git.SparkleGit.SSHPath = Path.Combine (msysgit_path, "ssh.exe"); + base.Initialize (); }