mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
parent
28f83e12fd
commit
bede3663ec
1 changed files with 5 additions and 9 deletions
|
@ -53,7 +53,11 @@ namespace SourceGit.Native
|
||||||
{
|
{
|
||||||
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
var dir = string.IsNullOrEmpty(workdir) ? home : workdir;
|
var dir = string.IsNullOrEmpty(workdir) ? home : workdir;
|
||||||
var terminal = DetectTerminal();
|
|
||||||
|
var terminal = "Terminal";
|
||||||
|
if (Directory.Exists("/Applications/iTerm.app"))
|
||||||
|
terminal = "iTerm";
|
||||||
|
|
||||||
Process.Start("open", $"-a {terminal} \"{dir}\"");
|
Process.Start("open", $"-a {terminal} \"{dir}\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,13 +65,5 @@ namespace SourceGit.Native
|
||||||
{
|
{
|
||||||
Process.Start("open", $"\"{file}\"");
|
Process.Start("open", $"\"{file}\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string DetectTerminal()
|
|
||||||
{
|
|
||||||
if (Directory.Exists("/Applications/iTerm.app"))
|
|
||||||
return "iTerm";
|
|
||||||
|
|
||||||
return "Terminal";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue