mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix: launch terminal in current user's home dir failed on macOS(#105)
This commit is contained in:
parent
7da184c55b
commit
9627206764
1 changed files with 3 additions and 1 deletions
|
@ -65,10 +65,12 @@ namespace SourceGit.Native
|
|||
public void OpenTerminal(string workdir)
|
||||
{
|
||||
var dir = string.IsNullOrEmpty(workdir) ? "~" : workdir;
|
||||
dir = dir.Replace(" ", "\\ ");
|
||||
|
||||
var builder = new StringBuilder();
|
||||
builder.AppendLine("on run argv");
|
||||
builder.AppendLine(" tell application \"Terminal\"");
|
||||
builder.AppendLine($" do script \"cd '{dir}'\"");
|
||||
builder.AppendLine($" do script \"cd {dir}\"");
|
||||
builder.AppendLine(" activate");
|
||||
builder.AppendLine(" end tell");
|
||||
builder.AppendLine("end run");
|
||||
|
|
Loading…
Reference in a new issue