diff --git a/src/Models/ShellOrTerminal.cs b/src/Models/ShellOrTerminal.cs index fa3a207b..02b294a0 100644 --- a/src/Models/ShellOrTerminal.cs +++ b/src/Models/ShellOrTerminal.cs @@ -54,6 +54,7 @@ namespace SourceGit.Models new ShellOrTerminal("deepin-terminal", "Deepin Terminal", "deepin-terminal"), new ShellOrTerminal("mate-terminal", "MATE Terminal", "mate-terminal"), new ShellOrTerminal("foot", "Foot", "foot"), + new ShellOrTerminal("custom", "Custom", ""), }; } } diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 191f4ddd..16fd1b78 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq.Expressions; using System.Runtime.Versioning; using Avalonia; @@ -27,6 +26,11 @@ namespace SourceGit.Native public string FindTerminal(Models.ShellOrTerminal shell) { + if (string.IsNullOrEmpty(shell.Exec)) + { + return string.Empty; + } + var pathVariable = Environment.GetEnvironmentVariable("PATH") ?? string.Empty; var pathes = pathVariable.Split(Path.PathSeparator, StringSplitOptions.RemoveEmptyEntries); foreach (var path in pathes)