mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
parent
e011b1807a
commit
30765cf7b3
1 changed files with 5 additions and 3 deletions
|
@ -66,13 +66,15 @@ namespace SourceGit.Native
|
||||||
|
|
||||||
public void OpenTerminal(string workdir)
|
public void OpenTerminal(string workdir)
|
||||||
{
|
{
|
||||||
var startInfo = new ProcessStartInfo();
|
|
||||||
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
startInfo.WorkingDirectory = string.IsNullOrEmpty(workdir) ? home : workdir;
|
var cwd = string.IsNullOrEmpty(workdir) ? home : workdir;
|
||||||
|
|
||||||
|
var startInfo = new ProcessStartInfo();
|
||||||
|
startInfo.WorkingDirectory = cwd;
|
||||||
startInfo.FileName = OS.ShellOrTerminal;
|
startInfo.FileName = OS.ShellOrTerminal;
|
||||||
|
|
||||||
if (OS.ShellOrTerminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
|
if (OS.ShellOrTerminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
|
||||||
startInfo.Arguments = $"start --cwd \"{workdir}\"";
|
startInfo.Arguments = $"start --cwd \"{cwd}\"";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue