mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feature<OpenTerminal>: support Windows Terminal
This commit is contained in:
parent
f041adb2b3
commit
5e706588a0
6 changed files with 123 additions and 86 deletions
|
@ -315,11 +315,20 @@ namespace SourceGit.Views.Widgets {
|
|||
Models.Exception.Raise(App.Text("MissingBash"));
|
||||
return;
|
||||
}
|
||||
|
||||
var start = new ProcessStartInfo();
|
||||
start.WorkingDirectory = repo.Path;
|
||||
start.FileName = bash;
|
||||
Process.Start(start);
|
||||
if (Models.Preference.Instance.General.UseWindowsTerminal) {
|
||||
Process.Start(new ProcessStartInfo {
|
||||
WorkingDirectory = repo.Path,
|
||||
FileName = "wt",
|
||||
Arguments = bash,
|
||||
UseShellExecute = false,
|
||||
});
|
||||
} else {
|
||||
Process.Start(new ProcessStartInfo {
|
||||
WorkingDirectory = repo.Path,
|
||||
FileName = bash,
|
||||
UseShellExecute = true,
|
||||
});
|
||||
}
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue