mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-30 22:01:10 +08:00
feature: support several more variants of git installation on MacOS (#852)
This commit is contained in:
@@ -25,7 +25,12 @@ namespace SourceGit.Native
|
||||
|
||||
public string FindGitExecutable()
|
||||
{
|
||||
return File.Exists("/usr/bin/git") ? "/usr/bin/git" : string.Empty;
|
||||
var gitPathVariants = new List<string>() {
|
||||
"/usr/bin/git", "/usr/local/bin/git", "/opt/homebrew/bin/git", "/opt/homebrew/opt/git/bin/git"
|
||||
};
|
||||
foreach (var path in gitPathVariants)
|
||||
if (File.Exists(path)) return path;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public string FindTerminal(Models.ShellOrTerminal shell)
|
||||
|
||||
Reference in New Issue
Block a user