From 4e13703b9d72faea735204eb506f0060ecaa7f2a Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 10 Jul 2024 11:57:02 +0800 Subject: [PATCH] fix: should not set `DISPLAY` env on Linux platform --- src/Commands/Command.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Commands/Command.cs b/src/Commands/Command.cs index c3676f16..37b59962 100644 --- a/src/Commands/Command.cs +++ b/src/Commands/Command.cs @@ -52,7 +52,8 @@ namespace SourceGit.Commands // Force using this app as SSH askpass program var selfExecFile = Process.GetCurrentProcess().MainModule.FileName; - start.Environment.Add("DISPLAY", "required"); + if (!OperatingSystem.IsLinux()) + 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_REQUIRE", "prefer");