mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
feature: support several more variants of git installation on MacOS (#852)
This commit is contained in:
parent
ced1737bdc
commit
addc756fbf
1 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,12 @@ namespace SourceGit.Native
|
||||||
|
|
||||||
public string FindGitExecutable()
|
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)
|
public string FindTerminal(Models.ShellOrTerminal shell)
|
||||||
|
|
Loading…
Reference in a new issue