GitCommands.GitModule.StartPageantWithKey C# (CSharp) Method

StartPageantWithKey() public static method

public static StartPageantWithKey ( string sshKeyFile ) : void
sshKeyFile string
return void
        public static void StartPageantWithKey(string sshKeyFile)
        {
            //ensure pageant is loaded, so we can wait for loading a key in the next command
            //otherwise we'll stuck there waiting until pageant exits
            var pageantProcName = Path.GetFileNameWithoutExtension(AppSettings.Pageant);
            if (Process.GetProcessesByName(pageantProcName).Length == 0)
            {
                Process pageantProcess = RunExternalCmdDetached(AppSettings.Pageant, "", "");
                pageantProcess.WaitForInputIdle();
            }
            GitCommandHelpers.RunCmd(AppSettings.Pageant, "\"" + sshKeyFile + "\"");
        }
GitModule