optimize<Command>: each process has its own envs

This commit is contained in:
leo 2021-10-12 17:26:39 +08:00
parent 75a46ceb74
commit 48020861ee
5 changed files with 11 additions and 4 deletions

View file

@ -16,7 +16,7 @@ namespace SourceGit.Commands {
var sshKey = new Config(repo).Get($"remote.{remote}.sshkey");
if (!string.IsNullOrEmpty(sshKey)) {
Environment.SetEnvironmentVariable("GIT_SSH_COMMAND", $"ssh -i '{sshKey}'");
Envs.Add("GIT_SSH_COMMAND", $"ssh -i '{sshKey}'");
Args = "";
} else {
Args = "-c credential.helper=manager ";