mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
fix<MacOS>: wrong path to find Terminal.app; GitInstallDir ends to the folder that contains bin/git; way to open and select file in Finder
This commit is contained in:
parent
5ac7d78796
commit
d74a3fb550
4 changed files with 7 additions and 4 deletions
|
@ -6,7 +6,7 @@ namespace SourceGit.Native {
|
|||
[SupportedOSPlatform("macOS")]
|
||||
internal class MacOS : OS.IBackend {
|
||||
public string FindGitInstallDir() {
|
||||
if (File.Exists("/usr/bin/git")) return "/usr/bin/git";
|
||||
if (File.Exists("/usr/bin/git")) return "/usr";
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace SourceGit.Native {
|
|||
if (Directory.Exists(path)) {
|
||||
Process.Start("open", path);
|
||||
} else if (File.Exists(path)) {
|
||||
Process.Start("open", $"\"{path}\" -a Finder");
|
||||
Process.Start("open", $"\"{path}\" -R");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue