[PTRun][Shell]Add a hidden option to use WindowsTerminal (#25661)

* Added an option in ExecutionShell for WindowsTerminal

* undo change of nuget.config

* Restore nuget.config
This commit is contained in:
Ivan Yochev
2023-05-02 16:35:23 +03:00
committed by GitHub
parent fc0cb883fd
commit c79723b03c
2 changed files with 15 additions and 0 deletions

View File

@@ -190,6 +190,20 @@ namespace Microsoft.Plugin.Shell
info = ShellCommand.SetProcessStartInfo("powershell.exe", workingDirectory, arguments, runAsVerbArg); info = ShellCommand.SetProcessStartInfo("powershell.exe", workingDirectory, arguments, runAsVerbArg);
} }
else if (_settings.Shell == ExecutionShell.WindowsTerminal)
{
string arguments;
if (_settings.LeaveShellOpen)
{
arguments = $"powershell -NoExit \"{command}\"";
}
else
{
arguments = $"powershell \"{command}\"";
}
info = ShellCommand.SetProcessStartInfo("wt.exe", workingDirectory, arguments, runAsVerbArg);
}
else if (_settings.Shell == ExecutionShell.RunCommand) else if (_settings.Shell == ExecutionShell.RunCommand)
{ {
// Open explorer if the path is a file or directory // Open explorer if the path is a file or directory

View File

@@ -38,5 +38,6 @@ namespace Microsoft.Plugin.Shell
Cmd = 0, Cmd = 0,
Powershell = 1, Powershell = 1,
RunCommand = 2, RunCommand = 2,
WindowsTerminal = 3,
} }
} }