mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
fix: ptyxis
does not start with given working directory (#1005)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
a0786bf9cc
commit
79306ad73b
1 changed files with 5 additions and 2 deletions
|
@ -65,13 +65,16 @@ namespace SourceGit.Native
|
|||
{
|
||||
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
var cwd = string.IsNullOrEmpty(workdir) ? home : workdir;
|
||||
var terminal = OS.ShellOrTerminal;
|
||||
|
||||
var startInfo = new ProcessStartInfo();
|
||||
startInfo.WorkingDirectory = cwd;
|
||||
startInfo.FileName = OS.ShellOrTerminal;
|
||||
startInfo.FileName = terminal;
|
||||
|
||||
if (OS.ShellOrTerminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
|
||||
if (terminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
|
||||
startInfo.Arguments = $"start --cwd \"{cwd}\"";
|
||||
else if (terminal.EndsWith("ptyxis", StringComparison.OrdinalIgnoreCase))
|
||||
startInfo.Arguments = $"--working-directory=\"{cwd}\"";
|
||||
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue