windows: explicitly point GIT_SSH to ssh.exe

This commit is contained in:
Hylke Bons 2013-02-13 22:45:12 +00:00
parent 3f0093759c
commit 1c02a4f7e8
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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 ();
}