diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 7c3f20f8..f784c691 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -26,19 +26,10 @@ namespace SourceGit.Native public string FindTerminal(Models.ShellOrTerminal shell) { - if (string.IsNullOrEmpty(shell.Exec)) + if (shell.Type.Equals("custom", StringComparison.Ordinal)) return string.Empty; - var pathVariable = Environment.GetEnvironmentVariable("PATH") ?? string.Empty; - var pathes = pathVariable.Split(Path.PathSeparator, StringSplitOptions.RemoveEmptyEntries); - foreach (var path in pathes) - { - var test = Path.Combine(path, shell.Exec); - if (File.Exists(test)) - return test; - } - - return string.Empty; + return FindExecutable(shell.Exec); } public List FindExternalTools() diff --git a/src/Native/MacOS.cs b/src/Native/MacOS.cs index 81918284..6e2293a7 100644 --- a/src/Native/MacOS.cs +++ b/src/Native/MacOS.cs @@ -34,7 +34,7 @@ namespace SourceGit.Native return "iTerm"; } - return "InvalidTerminal"; + return string.Empty; } public List FindExternalTools()