diff --git a/.gitignore b/.gitignore index ed1d7c43..0b5677c5 100644 --- a/.gitignore +++ b/.gitignore @@ -604,3 +604,4 @@ build/*.zip build/*.tar.gz build/*.deb build/*.rpm +build/*.AppImage diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 1b623334..d3f9203d 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -456,10 +456,10 @@ namespace SourceGit private bool TryLaunchedAsAskpass(IClassicDesktopStyleApplicationLifetime desktop) { var args = desktop.Args; - if (args.Length <= 1 || !args[0].Equals("--askpass", StringComparison.Ordinal)) + if (args.Length != 1 || !args[0].StartsWith("Enter passphrase", StringComparison.Ordinal)) return false; - desktop.MainWindow = new Views.Askpass(args[1]); + desktop.MainWindow = new Views.Askpass(args[0]); return true; } diff --git a/src/Commands/Command.cs b/src/Commands/Command.cs index 1cd499d0..c3676f16 100644 --- a/src/Commands/Command.cs +++ b/src/Commands/Command.cs @@ -53,7 +53,7 @@ namespace SourceGit.Commands // Force using this app as SSH askpass program var selfExecFile = Process.GetCurrentProcess().MainModule.FileName; start.Environment.Add("DISPLAY", "required"); - start.Environment.Add("SSH_ASKPASS", $"\"{selfExecFile}\" --askpass"); + 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"); // If an SSH private key was provided, sets the environment.