fix: should not set DISPLAY env on Linux platform

This commit is contained in:
leo 2024-07-10 11:57:02 +08:00
parent ca461d1926
commit 4e13703b9d
No known key found for this signature in database

View file

@ -52,6 +52,7 @@ namespace SourceGit.Commands
// Force using this app as SSH askpass program // Force using this app as SSH askpass program
var selfExecFile = Process.GetCurrentProcess().MainModule.FileName; var selfExecFile = Process.GetCurrentProcess().MainModule.FileName;
if (!OperatingSystem.IsLinux())
start.Environment.Add("DISPLAY", "required"); start.Environment.Add("DISPLAY", "required");
start.Environment.Add("SSH_ASKPASS", selfExecFile); // Can not use parameter here, because it invoked by SSH with `exec` start.Environment.Add("SSH_ASKPASS", selfExecFile); // Can not use parameter here, because it invoked by SSH with `exec`
start.Environment.Add("SSH_ASKPASS_REQUIRE", "prefer"); start.Environment.Add("SSH_ASKPASS_REQUIRE", "prefer");